windows installer - Retrieving version of an MSI file (built with WiX) -


I have created an MSI file with YSX. The source version of this file in the YX file is:

  Product ID = "..." name = "..." language = "1033" version = "1.0.0.1" creator = "..." upgrade code = "..." & gt;  

The MSI file works fine: it installs, it is uninstalled, when I increase the version number etc.

However, when I try to get the MsiGetFileVersion () API, the version information about this file by calling the API, it returns error 1006 (version information is not included in the ERROR_FILE_INVALID file).

So my question: How to retrieve the version (in programming, C ++) the number of an MSI file? Or, to install it in another way, where in the YSX file MSIAgateFileWarsian () should be informed about the version to be recoverable?

More information: The same error occurs with MSI 3.0 on Windows XP and MSI on Vista.

For just perfection, :: MsiGetFileVersion () is a function that reads the version of the PE file ( .XA or .DEL) is the key to building tools (such as) to use the resource information same as the Windows Installer does, so that they are properly populated with the file / @ version information. You can not get MSI version information as @sascha shows you "Pro Ktwarsian can ask the property table "or you :: MsiGetProductProperty (can use) that will be that.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -