This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: VB Script Error "File does not exist" when saving InstallScript MSI project
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 08, 2008
02:42 PM
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
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
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 08, 2008
03:43 PM
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?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 08, 2008
04:31 PM
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.
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 08, 2008
05:06 PM
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)?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 08, 2008
05:26 PM
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?
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?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 08, 2008
05:33 PM
No, that shouldn't be a problem; my project file was called installscript_msi_2008.ism...
![](/skins/images/8C9D13A71C7F7695F3262372C0172D68/responsive_peak/images/icon_anonymous_message.png)