cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
selvamgt
Level 3

Common Automation Interface for Installshield 12 and Installshield 2008

Hi,

I am writing a VB Script to open a .ism file, modify the version number, save the .ism file and close it. The following VB Script to do the same thing.

Set ISWiProject = createObject("IswiAuto14.ISWiProject")
ISWiProject.OpenProject wscript.arguments(0)
Set pProperty = ISWiProject.ISWiProperties.Item("ProductVersion")
pProperty.Value = "09.02.03"
ISWiProject.SaveProject
ISWiProject.CloseProject

I'm able to open Installshield 2008 ism file using this "IswiAuto14" object. But not able to open Installshield 12 ism file.
Can any one pls tell me any other common object to open Installshield 12 ism as well as installshield 2008 ism file.

Regards,
Selvam
Labels (1)
0 Kudos
(1) Reply
Christopher_Pai
Level 16

There is no common interface ( like foo.foo vs foo.foo.1 ) because the API is designed to have multiple build engines on the same machine.

Since VBScript is late binding, you could create a function that acts as a factory provider for the automation interface. Do a try catch and if 2008 ( 14 ) fails, then try to instantiate 12 and if that fails throw an exception. Otherwise take the object and return it to the caller and let him use it.

Btw, the progid is the same only change 14 to 12.
0 Kudos