cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rhawkins
Level 2

Cannot get product version from setup.exe

When I read the Setup.exe product version within my application, I get the Installshield version of 16.0.0.0 instead of the product version defined within the General Tab. The file version is correctly showing as 16.0.0.400; so how do I get the product version information?

I am using the GetFileVersionInfo and VerQueryValue functions.

Sample code from Microsoft can be found at http://support.microsoft.com/kb/139491
Labels (1)
0 Kudos
2 Replies
Ajay_Ladsaria
Level 7

You may want to try and get your product's version a different way. For example, if you are trying to get the version after your product has been installed, then you could check the MSI Uninstall registry key pertaining to your product:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{YourInstallProductCode}
DisplayVersion REG_SZ

Or you could try using a MSI API to get the version:
MsiGetProductInfo Function
http://msdn.microsoft.com/en-us/library/aa370130(VS.85).aspx

If you are trying to get the version from a custom action during the install, then you could try using MsiGetProperty (C++ DLL) or Session.Property (VBScript).
0 Kudos
scottd72
Level 7

I have the same problem/question.

Using GetFileVersionInfo and then VerQueryValue to retrieve the dwProductVersionMS and dwProductVersionLS values always returns 16.0.0.0. I get the correct product versions of any other exe I test, just not the Installshield Setup.exe.

I'm trying to find the product version of the setup.exe before it is installed, so I don't think using MsiGetProductInfo will help me.

So how can I get the correct product version from the setup.exe?

Thanks.
0 Kudos