View Full Version : Changing the version number of the installed product with the StandaloneBuild

12-15-2004, 11:54 AM
Hi, I need to change version number of my product (you know, General information->Product properties->Version) live while I build from the command line with the Installshield 10.5 StandaloneBuild. I don’t want to just increment it, I want to read it from an environment variable or a text file and set it at the build time via the command line. Is it possible? If yes how??

Thanks in advance

Christopher Painter
12-15-2004, 12:17 PM
I save my ISM file in XML format so that I can manipulate it prior to calling IsBld.

12-15-2004, 02:15 PM
There's also the InstallShield Automation interface, which you can use whether the project is stored in binary or XML format...

01-02-2005, 02:59 AM
I have the same problem. I need to change the ProductVersion at build time after I read it from an external file.
The problem with Automation Interface is that ProductVersion in ISWiProject Object is read only. So it can't help in this case.

Christopher Painter
01-02-2005, 09:50 AM
Just store the file in XML format and use your favorite file i/o text string manipulator of your choice suitable to your language.

IMHO now that XML is available it's the ONLY way to store a project. Binary is completly unsuitable from a CM perspective, and a bunch of ISV and IDT files are a royal pain in the rear. Even if you have legacy projects stored in this manner it's not that much work to convert them all to XML and move forward from there. I should know, I had to do this to about 100 projects when XML project source came to existance.

01-05-2005, 01:04 PM
Here is a VB Script fragment which does this using the automation interface:

Set oIPWI = CreateObject("SAAuto9sp1.ISWiProject")
oIPWI.OpenProject projectName
oIPWI.ProductVersion = versionText

In this script fragment, "projectName" is a string variable containing the name of the ISM project to open and "versionText" is a string variable containing the new version text to use as the ProductVersion. You can expand this script fragment as necessary to get the projectName and versionText from the command line, or from a text input file, or whatever.

The final script is written as a .VBS file and executed using "cscript", the command line version of the Windows Scripting Host. For more information about the IS automation interface, look up the ISWiProject automation object in the IS docs. It is the root object and all of the other objects are linked to this.

Please note that I am referencing the "SAAuto9sp1" namespace here. This is for the StandAlone Builder Version 9 SP1. For the full version 9 product, the correct namespace is "ISWiAutomation9". I'm not positive what the ISX namespaces are, but they are probably "10" instead of "9".