cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Dean_H
Level 7

VB Script Error "File does not exist" when saving InstallScript MSI project

I'm using the 3rd Party Software, Visual Build Pro 6 (vendor, Kinook) to create an automated build. When I try to execute the following VB Script to increment the InstallShield Build number, the error "File does not exist" is always generated. This works successfully with my Basic MSI project, however it ALWAYS fails with the InstallScript MSI project.

I have contacted Kinook (vendor of Visual Build Pro 6), and they informed me that I need to contact InstallShield about this issue. You can reproduce the problem outside VBP by copying the VBScript code to a .vbs file and running via wscript.exe/cscript.exe.

I need to get a resolution to this so we can make unattented nightly builds-Please Help!

' 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
Labels (1)
0 Kudos
(5) Replies
RobertDickau
Flexera Alumni

The script seems to work for me with InstallShield 2008 and an InstallScript MSI project. What line of the script gives you the file-not-found error?
0 Kudos
Dean_H
Level 7

Robert,

Here is the output. As I mentioned in my initial posting, If the project is MSI Basic, this function is successfully executed
Line 13, column 1, objInst.OpenProject "C:\My Setups\TRIOS\TRIOS1.ism"
Error in Run Script (VBScript) script code at Line 13, Column 1 (File does not exist.)
1/8/2008 5:22:32 PM: Step 'Script to Increment IS Build Number' failed
1/8/2008 5:22:32 PM: Build ended.
0 Kudos
RobertDickau
Flexera Alumni

And the .ism file does exist in that location? Does it work with any other InstallScript MSI project (perhaps create a new one for testing)?
0 Kudos
Dean_H
Level 7

Robert,

I figured out why the script was failing. The actual name of my InstallScript project was Trios_IS_MSI.ism, I used Trios1 in my example to make it simple. It appears the underscores cause the script to fail. I renamed my InstallScript project to TRIOSISMSI.ism and it now works. I'm no expert on Visual Basic, but are underscores not allowed for for a project name in Visual Basic?
0 Kudos
RobertDickau
Flexera Alumni

No, that shouldn't be a problem; my project file was called installscript_msi_2008.ism...
0 Kudos