PDA

View Full Version : VB Script error when trying to increment the Property CDVersion in InstallShield


dheller
06-11-2008, 12:47 PM
I have created a new Private Property in my InstallShield project called CDVersion, with the value 1.1.0.280. I would like to use a VBScript to increment that number just like the one that is used to Increment The ProductVersion. I have tried to modify that script, but I get an error at line 19, (Object doesn't support this property or method: 'objInst.CDVersion')

Is there a way I can get this to work?

' create the InstallShield Developer automation object

Set objInst = CreateObject("ISWiAuto14.ISWiProject")
' for InstallShield 2008 (use SAAuto14.ISWiProject for standalone)

' use "ISWiAuto12.ISWiProject" for InstallShield 12 (use SAAuto12.ISWiProject for standalone)




' open the project file

objInst.OpenProject "C:\My Setups\Trios2_Release\Trios2_Release.ism"

' this code demonstrates incrementing the CD version number

' retrieve and split the CDVersion

verArr = Split(objInst.CDVersion, ".")

' increment last field

verArr(UBound(verArr)) = CStr(verArr(UBound(verArr)) + 1)

' update the project

objInst.CDVersion = Join(verArr, ".")

objInst.SaveProject

objInst.CloseProject

kinook
06-11-2008, 12:52 PM
You would need to ask the InstallShield vendor.

dheller
06-11-2008, 12:57 PM
Well, I not very familiar with VB so I wanted to knowif the script was setup to properly increment the number just as the script that increments The ProductVersion

wallywojo
08-14-2008, 10:40 AM
Not sure if you are still working on this, but the Automation interface you are using there does not expose all the properties in the property table, just a select few.

To do this, you will need to use the Windows Installer Automation Interface where you have access to the entire database. InstallShield's help has step-by-step guide in a kb on how to use that interface.