Search code examples
wix

How to modify Bundle version dynamically during installation


There is a need to read a version from a file and dynamically use it to modify the bundle version as the first step of the installation process.

Is it advisable to change the bundle version dynamically during installation? If it is possible to make changes, we would appreciate any guidance on how to proceed.

I tried setting the version in the following manner but was unable to change it.
Engine.SetVariableString("WixBundleVersion", "10.1.2.3333", false)

During installation, I expect the bundle's version to change dynamically.


Solution

  • Is it advisable to change the bundle version dynamically during installation?

    Nope. Not supported. The Bundle will use its version for important upgrade calculations so it is not dynamic. Set the correct version at build time.