PDA

View Full Version : Script to Increment InstallShield Build Number Fails


dheller
01-08-2008, 09:30 AM
I just upgraded from InstallShield 12 to InstallShield 2008 and changed my project from MSI Basic to InstallScript MSI and now when I try to execute the VB Script to increment the InstallShield Build number, the error "File does do exist" is always generated. This works if it try it with my Basic MSI project, but always fails with the InstallScript MSI project

' 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\TRIOS\TRIOS1.ism"

' this code demonstrates incrementing the revision version number

' retrieve and split the ProductVersion

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

' increment last field

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

' update the project

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

objInst.SaveProject

objInst.CloseProject

kinook
01-08-2008, 10:39 AM
You would need to submit this problem to the InstallShield vendor. You can reproduce the problem outside VBP by copying the VBScript code to a .vbs file and running via wscript.exe/cscript.exe.