cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
john_hall
Level 4

Automation Interface Question

I am having a couple problems. They may be due to my lack of VBScript experience, but I have searched the forum and the web without finding anything helpful.

1. I cannot get the CreateProject method to work. I copied and pasted the code from the Help Library, but eptMsi doesn't have a value. Why is this? The code is

Dim pProject
Set pProject = CreateObject("ISWiAuto15.ISWiProject")
Dim sProjectName
sProjectName = "C:\InstallShield 2009 Projects\TestProject.ism"
wscript.echo eptMsi
pProject.CreateProject sProjectName, eptMsi
pProject.OpenProject sProjectName, False
pProject.CloseProject

after I remove the As Y parts (see #2) and add the echo.

2. In some places, the examples use something like

Dim X As Y

However, I get an "expected end of statement" error at (line, 7) (the A in As). Why is this?

Thank you.
Labels (1)
0 Kudos
(5) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

Per my limited knowledge of VB and VBScript, the former supports Dim X as Y; the latter does not. The example in the help is VB, not VBS. Chances are good that most VB examples can be turned into VBS files with minimal changes (such as removing the as Y, and replacing constants like eptMsi with their integer values), but this is not guaranteed.

I think that wscript object is also not likely to be available in the Windows Installer support for VBScript, at least unless you create it yourself.
0 Kudos
john_hall
Level 4

Actually, the wscript.echo works. Is there a list of the values for the constants like eptMsi?

Also, how would I go about modifying the dialog boxes that are displayed during install? Is this possible through the Automation Interface?
0 Kudos
RobertDickau
Flexera Alumni

We usually try to document the constant values, but seem to have missed that one; please try these:

  • eptMsi = 1 (Basic MSI)
  • eptMsm = 2 (merge module)
  • eptPro = 9 (InstallScript)
  • eptProObj = 10 (InstallScript Object)


(If you have Microsoft's OLE/COM Object Viewer, you can export an IDL file containing these and other values for ISWiAuto15.)
0 Kudos
Christopher_Pai
Level 16

Everything in vbscript is a variant. Also unless you do an option explicit statment, you don't even have to declare any variables.
0 Kudos
john_hall
Level 4

Can I modify the dialog boxes from the automation interface?
0 Kudos