Why is WiX detecting Windows Installer 4.05 when 4.5 is installed? - windows-vista

This is a bit of a strange problem. I have an installer that needs to check the version of Windows Installer on a machine, so I use the VersionMsi property to do this.
However, when trying it out on a Vista 32-bit machine, I have found that it reports that I have 4.05 installed. So I checked msi.dll, msiexec, etc and found that they were all at 4.5.
There must be a registry value or something else that is still pointing to 4.05, so I was wondering if there is a way to safely rollback to 4.05 and then apply the update again?
Thanks

The documentation for InstallerVersion attribute of the wix Package element shows a hint (emphasis added by me):
The minimum version of the Windows
Installer required to install this
package. Take the major version of the
required Windows Installer and
multiply by a 100 then add the minor
version of the Windows Installer. For
example, "200" would represent Windows
Installer 2.0 and "405" would
represent Windows Installer 4.5. For
64-bit Windows Installer packages,
this property must be set to 200 or
greater.
Also, if you think about it, 4.05 and 4.5 are exactly the same if you interpret the dot as a number separator rather than a decimal point. 05 is just a way to write 5 with two digits in that case.

My guess is that it's something weird going on inside WiX and/or your registry since the "05" portion is neither, so to speak, Microsoft nor generally accepted way of versioning products.

Related

Multi-part Windows installer version numbers

I've noticed that some programs installed on Windows have more than three numbers in their versions. The installer creation software vendor that I use claims in their support forum that Windows Installer only uses three numbers (like major.minor.patch).
My question is, how do these other installers set different formats?
Some even have rather wacky date-like values embedded in them.
The DisplayVersion uninstall entry is just a string value and can be set to anything the installer wishes (especially if it is not a MSI based installer). Windows itself does not use this string for anything other than showing it to the user.
MSDN does say that DisplayVersion is "Derived from ProductVersion property" but that of course only applies to MSI installers.
The documentation for ProductVersion claims the syntax is major.minor.build but that same page also says:
Note that Windows Installer uses only the first three fields of the product version. If you include a fourth field in your product version, the installer ignores the fourth field.

Comprehensive list of programs on different operating systems

How would I get a list of EVERY program into a text file for windows 95-windows 10. The uninstall programs in control panel doesn't have the version and publisher for the older operating systems, and wmic does not display every program. Even the uninstall registry, which I thought would be my savior, does not list every program. I can see discrepancies between that and the uninstall programs tab. Powershell and the like are off the table since it is relatively new.
Some combination of the following:
Enumerate registry for HKEY_CURRENT_USER\Software\Microsoft\CurrentVersion\Uninstall and HKEY_LOCAL_MACHINE\Software\Microsoft\CurrentVersion\Uninstall. And probably HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall on 64-bit os (might be duplicated). These are the list of installed programs that appear in the Control Panel's "Program and Features" section. Notice that some of the entries are straight-forward and have most of the data you want. Others are a GUID - this corresponds to an MSI installation.
For all the entries obtained in #1 that reference a GUID, use the MSI API to find the installation information you seek. Start with MsiEnumProducts. From there you can get at version info of installed applications.
Brute force search for EXEs installed in C:\Program Files and C:\Program Files (x86). For each EXE found, you can use this method to get the version information.
You want a list of applications installed from the Windows Store? Ask me for a code sample if that's important too.
The registry uninstall registration requirements in the 90's was just the display name and the command to start the uninstallation. Windows 2000 added support for more values and exposed them in the new UI but they were still optional. In recent years a couple of them became a requirement to pass the Windows Logo tests but they are still optional for non-certified applications so the uninstall key is not guaranteed to contain version/publisher information for every entry. Portable applications are not listed in the registry so if you need a inventory of everything then you need to inspect all exe files and ignore the registry.
Supporting everything back to Win95 RTM is going to be tough since you have nothing except batch files as a scripting option. VBScript is a optional component that normally gets installed with IE 4 and I don't even remember if it is possible to get Powershell on these systems.
I don't think it is possible to extract the version information with a simple batch file, you probably need the help of a 3rd-party tool. The issue with 3rd-party tools is that a lot of them depend on the Microsoft CRT run-time .DLLs and Windows 95 RTM does not have them out of the box, not even msvcrt.dll.
If you can raise your requirement for Win95 to have Windows Scripting Host installed (redistributable or part of IE4) then you could write a VB/Jscript file that uses the FileSystemObject to both walk the entire directory tree on every drive and to get version information from .exe files.
If that is unacceptable then you need to try to find a tool that can extract version information. There is a Microsoft tool named filever.exe listed here but I don't know if it works on Win95 and a NirSoft tool here but I'm not sure if it supports stdout redirection from the commandline (but it is open source so you could fix that if needed). Even if you find a suitable tool you would still need to walk the directory tree looking for .exe files and that is not going to be fun when you are limited to command.com and its DOS compatible batch handling.
My recommendation is to write a new application. I can't recommend writing it in a .NET language because you would be dealing with versions 1-4 and it is not installed on XP and older by default.
The way I see it, you have 3 options if you are writing it yourself: Visual Basic 6, Delphi (something old, v3 or older perhaps) or C/C++.
For C/C++ any version of Microsoft Visual C++ or MinGW/GCC will do but the older the better and you must not link to or use any C run-time library stuff (you might get away with static linking with MinGW but not recent versions of Visual Studio). If I was doing this I would use Visual Studio 6 or 2003 and build with /Zl & /NODEFAULTLIB. There are multiple small standalone CRT libraries if you need them. If you use any recent version of Visual Studio you will manually have to hex-edit the file to make it run on anything older than XP.
The actual implementation needs to call FindFirstFileA (and friends) on Windows 95/98/ME and FindFirstFileW on other systems to walk the directory tree and GetFileVersionInfoA/W (and friends) to get version info.
If you are feeling fancy you could perhaps filter out files in %WinDir% signed by Microsoft. Good luck...

How can the behavior of my .msi on Windows Vista and Seven be so weird?

I have a .msi created with InstallShield that i'm trying to work correctly in a per user installation for Windows Vista and Seven.
I'm virtualizing Vista and Seven with virtuabox, with 3 accounts each :
-Admin1 (default account)
-Admin2
-User1
Whatever account i'm signed, it always install the software for Admin1, and the .msi always give me the choice between Permachine and peruser.
i can give the value i want (through InstallShield) to Allusers parameter, it doesn't affect the behavior on Vista and Seven.
I'm desperatly trying to use Orca/windows installer logs/Winlogutl.exe
I don't know what to look for with these tools.
So My question is :
How can the behavior of my .msi on Windows Vista and Seven be so weird?
What can i look for to resolve the problem?
The behavior of the ALLUSERS property, as occasionally used before the UAC era to provide a "for all users or just me" option, was not well conceived and does not work well, especially in the post-UAC era. On Windows Vista, you can only choose one value for the setting on your .msi package that has it elevate or not; ALLUSERS does not change this. Since it always (or never) elevates, you can really only handle one of the two scenarios.
Windows 7 and Windows Installer 5 introduced the MSIINSTALLPERUSER property which can override the setting that causes the package to elevate. Thus the same package can either elevate and install for everyone, or can remain non-elevated and install for "just me". While versions of InstallShield since Windows 7 came out provide this configuration option, it will still not work on Windows Vista.
So unfortunately you cannot get the behavior it sounds like you desire on Windows Vista unless you offer two packages. Your single package will always (or never) elevate, and thus will always install for everyone or just the administrative account to which it elevates. For Windows 7 you should be able to use the MSIINSTALLPERUSER approach.

The procedure entry point _except_handler4_common could not be located in the dynamic link library msvcrt.dll

I am using "Microsoft Visual Studio" to work with an "MFC application".
I am using "Installshield" to create the setup file for this application.
I get a "setup.exe" file.
If I run this setup on a "Windows XP 32 bit" machine, the installation ends properly.
Yet, when I try to start the installed program, I get the message:
"The procedure entry point _except_handler4_common could not be located in the dynamic link library msvcrt.dll."
In debug mode, I can't find the moment the error occurs because whatever the breakpoint I put in the code, the message appears before reaching the breakpoint, I guess at the very beginning of the program execution...
Note: It works for Vista 32 bit and Seven 64 bit.
It appears lots of people do have the same problem but I couldn't find a solution for myself.
Can you help?
Thank you.
Welcome to the world of DLL hell and application dependency analysis.
I found that DLL on my Win8 machine in the SYSWOW64 (32bit System32 folder ) with version 7.0.9200.16384. Looking at it using Dependency Walker I can see it in fact exports the function you are looking for.
I also see on my InstallShield machine a merge module called MSVCRT.MSM that redistributes version 6.00.8797.0 of this file. However when I look it using Dependency Walker, I see it has the exported functions _except_handler2 and _except_handler_3 but not _except_handler_4_common.
So therefore you need a newer DLL and that merge module won't help you. Microsoft used to have this cool website called DLL Help Database that told you all the versions of a file and what shipped them but sadly they killed it.
BTW, I can also see that this DLL is installed with Windows these days. Windows XP? I'm not so sure as I'd have to fire up a VM and look.
A couple possible resolutions:
Find out what SP or Hotfix of Windows fixes this and make it a dependency of your MSI.
Grab the DLL from a Win 8 machine and add it to your INSTALLDIR and deploy it privately.
One final note. This is either caused by the version of Windows XP comes with an old version of the DLL ( A related KB Article says it does ) or that a third party application whacked the DLL causing the problem. Some more study is required here.
I recommend you first try installing the MSVC Redist version 2008. That one does include the implementation of the missing function.
This post is old but I wanted to leave my solution since this problem was hell to me. My python app was working for Linux, Win7, 8 and 10 but WinXP refused to work with that message.
I was using py2exe to get an executable and it will put some DLLs along with the exe file.
Deleting some dlls from the exe's directory was the only thing that make the app work in XP and continue working in the other systems:
[ "POWRPROF.dll","IPHLPAPI.DLL","USP10.DLL", "DNSAPI.DLL" ]
Also distributing "Microsoft.VC90.CRT" directory along with the exe file, with it's manifest and DLL files.
I hope this will be useful for someone, since it took me weeks to figure it out.
(i know the OP wasn't working with python, but the error is just the same)
Your program has a dependency which is not being satisfied on Windows XP. You might try using Dependency Walker to identify it, or you might check for known limitations. For example, Visual Studio 2012 doesn't support Windows XP until update 1 and a build option change - is that what you're using?
The problem was probably because you might used a corrupted DirectX version on your Win XP. It happened to me as well because I randomly downloaded a DirectX setup which was corrupted and caused these. The solution I did was is I deleted all the files that has anything to do with directX from C:Windows/System32, deleted the directX from add/remove program as well and completely removed the whole registry key from regedit. Local_machine/software/microsoft/DirectX... What I did then was found a original values and keys for DirectX 9 on the net and made a new registry key.
The DirectX folder was once completely and originally back on regedit and it showed in dxdiag that the directX is installed.
In case you encounter crashes in the game, I suggest you to download .NET Framework 3.5 Service Pack 1 and then make a backup on your PC (If you're not using nVIDIA graphic cards like I do, I use ATI Radeon) and download nVIDIA PhysX system software driver and see if it works. (You need nVIDIA phydX drivers to run this game without crashes only if you use Win XP, the problem shouldnt encounter on Win 7) In case the drivers screw up your PC (The nVIDIA PhysX one) you will be able to restore your old PC function before those drivers (If you made a backup of your PC, I suggest using Acronis Boot for backups) it means you're totally out of luck if you're not able to get the nVIDIA PhysX on ur for example, ATI graphics on Windows XP, because without nvidia physx, on Win XP, Metro wont run, while on Win 7 / Vista / 8 it should.
I just installed the latest VS 2017 and was running into the same problem. I googled everything but couldn't find any solution, so I just defined it myself:
extern "C" int _except_handler4_common() {
return 0; // whatever, I don't know what this is
}
I've spent the last 8 hours picking my code apart with this exact same error and it turned out to be a line of code in my application, specifically a check for IPv6 support in the OS:
conf.IPv6Disabled = !(Socket.OSSupportsIPv6);
I commented that line out and voila, error disappeared.
This problem persists to every software or game that requires windows 7 or 8 or vista but is made run into windows xp. So if you want to resume or start your program you need to upgrade your windows to 7 or 8 or vista as per the system requirements of the program.
HOPE IT WAS HELPFUL
THANKS

Windows version outside the registry?

I need take an old software that was built in 4D 2004 (you probably never heard about 4D but it doesn't matter) and make it compatible with Windows 7 by fooling it and making him believe he's running under Windows XP.
I thought the application was getting the version number of windows from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion and that I could change this value but I was wrong… Even if I change the values in the registry, the version number of windows returned by my application is always the same:
498139398 for Windows 7
170393861 for windows XP
Those value contains the windows version (this link explain how to extract the version number) but I don’t know where it was taken from.
If you google those numbers, you’ll find out that other applications are referring to the same version number.
I tried to find what registry was used by the application with a Process Monitor but none of the registry accessed by the application seems to be related to a windows version.
Does anyone have a clue of where those values might be coming from? Could it be outside the registry / hardcoded somewhere?
Windows already has tools to do this. Have you tried right-clicking on the program, selecting Properties and looking at the Compatibility tab?
For more complex tricks investigate "Microsoft Application Compatibility Toolkit".

Resources