Search code examples
installationwindows-installerinstallshield-2011

InstallShield use product version in Path variable


Is there a way to use the product version number as a variable when building an path for where the exe gets dumped or for other scenarios, etc.

That way I can set the variable once and just have it automatically be updated everywhere. (eventually, I want to pass in the version number, but thats down the road.)

Thanks


Solution

  • I tried lots of things but there seems to be no way to use a variable product version string (there's a number of threads on the net as well that come to this conclusion). Moreover in our project we also use the version string in the shortcut names, the setup file name etc and found no way to store this in a single place. We found a very manageable solution though via automation. Here's a sample that updates version number and filename using VBScript, but you can also use C# for instance.

    Set ISWIProject = CreateObject("IswiAuto19.ISWiProject")
    ISWIProject.OpenProject "Our.ism"
    ISWIProject.ProductVersion = "4.0.2.0"
    ISWIProject.ISWiProductConfigs.Item("Release").SetupFileName = "App_4.0.2.0_Setup"