0
votes

I am trying to create a script that will automate the process of creating an installShield object.

I have selected to develop it with VBScript because the Automation Api is very helpful for vbs developing. This a very simple code that i have made

Set m_ISWiProject = CreateObject("IswiAuto18.ISWiProject")
strFile = "C:\<WindowsFolder>\Profiles\<UserName>\Personal\MySetups\Test.ism"  
m_ISWiProject.OpenProject strFile

The problem is that when i try to run it, i get this error

ActiveX component can't create object: 'ISWiAuto18.ISWiProject'

that is probably because of missing libraries or because the program cannot find the source code for the API that i am using.

Any information about using API with vbscript or even better VBScript and install shield is very appreciated.Thank you all in advance.

1
Code doesn't match error. Ensure the relevant automation layer is registered, and the code matches it. - Michael Urman

1 Answers

4
votes

The error

"ActiveX component can't create object"

occurred because the automation interface is a 32-bit interface; therefore, it must be loaded from a 32-bit process. If you are using the automation interface on a 64-bit machine, you may need to load the automation interface through a 32-bit executable file.

For example, if you are using VBScript with the automation interface, you may need to launch cscript.exe from the 32-bit system folder (SysWow64). Otherwise, the 64-bit scripting host may encounter an error such as the following one when creating the automation object

This action solved the problem