Search code examples
wixinstallationwindows-installerwix3.5wix3

Wix: setting the version of the installer


I am currently trying to set the version of the installer that I create using Wix toolkit like in the below code:

<Product Id="*" UpgradeCode="..." Name="App Name" 
         Version="!(bind.FileVersion.MyApplicationVersion)"

<Directory Id="TARGETDIR" Name="SourceDir">
 <Directory Id="ProgramFilesFolder">
  <Directory Id="INSTALLDIR" Name="CompanyName">
   <Directory Id="SUBDIR" Name="Application Name">
     <Component Id="ApplicationFiles" Guid="*">
        <File Id="MyApplicationVersion" Name="app.exe" Id="ApplicationFile1" 
              Source="app.exe" Vital="yes" />
     </Component>
    </Directory>
   </Directory>
  </Directory>

This builds ok but I see that the version number is not updated in the Add/Remove panel. I have read that the one that I see in this panel is display version and what I is nothing to do with the display version. My question is, what is the purpose of having two different versions (display version and product version)?

And of course, how can verify that I set the product version correctly? I have checked the debug logs but it's nowhere. I am wondering if my above bode works ok or not.

The third question is, of course, how can I set the display version? I know that it can be changed in registry but I am looking for a way to change it in wxs file.

Thanks.


Solution

  • That scenario works for me, as long as the .exe file has a legal product version (<255.255.65535.65535).

    What do you mean by "updated"? Is this a clean install or an upgrade? What's the version in app.exe? What, if anything, shows up in the ARP Version column? What shows up in the Uninstall key in the registry?