View Full Version : Installscript GETVERSIONEX returns incorrect Windows Operating System

09-03-2014, 07:44 AM

Have a Basic MSI Project - it was migrated from IS2008 to IS2014
A Custom Action invokes a piece of Installscript. This loads a DLL which in turn issues GETVERSIONEX (it is trying to validate a license key to a particular version of windows)
Running the installation on Windows 7 - but it returns info. for Windows Vista.
Have checked the manifest for the SETUP.EXE (picks up the SETUPEXE.INVOKER.MANIFEST). This contains the Compatibility codes for latest Windows Operating systems.
When I look @ Resource Monitor, I can see that the SETUP.EXE is running in the Windows Operating Context for Windows 7.
However, when the installscript is activated, an instance of ISBEW64.DLL is triggered. This is executing in Windows Vista Context.
Is this causing the problem for the DLL returning incorrect operating system?
Why did ISBEW64.DLL use the Windows Vista context when called from SETUP.EXE which is Windows 7 context?
There do not appear to be any registry entries for HKCU\Software\Microsoft\Windows NT\CurrentVersion\App[CompatFlags\Layers, etc.
Any ideas on how to get the installscript to execute in correct context?

09-03-2014, 10:14 AM
This sounds like the issue that is described in the following blog post:
Why Custom Actions get a Windows Vista Version Lie on Windows 7 (http://blogs.msdn.com/b/cjacks/archive/2009/05/06/why-custom-actions-get-a-windows-vista-version-lie-on-windows-7.aspx)

Is there any way that you can try to use the Windows Installer function MsiGetProperty and retrieve the value of the VersionNT property?

09-03-2014, 10:24 AM
Yep - I saw this too.
The DLL that is called is from a third party - I use UseDLL to load it and then call it.
Interally it is issuing the GETVERSIONEX and checking a License file against the Windows Version.
Unfortunately, the ISBEW64.EXE (which I assume is executing the installscript) is executing in Windows Vista context under the Windows 7 target machine.
If this is the case, then why is it so - as the SETUP.EXE is running in Windows 7 context and initiated the ISBEW64.EXE - which should keep the same context properties?

09-03-2014, 10:43 AM
It doesn't matter how Setup.exe and ISBEW64.EXE are launched. Windows Installer is what launches a custom action, and it gets the shim, so you see the version number that's described in the blog article.