cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sbaebler
Level 2

Launch and terminate applications during installation

Hello

In order to configure the application I install, I need it to be run once and shut down again after 5 seconds. I tried to do this with the Visual Basic Script:


Dim WshShell, oExec

Set WshShell = WScript.CreateObject("WScript.Shell")

Set oExec = WshShell.Exec("application.exe")

Wscript.Sleep 5000

oExec.Terminate()


I set the Wait for Action Option to yes and the Ignore Exit Code to no.

The behaviour is as expected, when I run it in the internet explorer, but when I add it as Custom action to Installshield Express, I just get an error "...A script required for this install to complete could not be run. ..." during the installation.

Am I not allowed to launch applications in a vbs in Installshield? Is there a better way to do this (maybe using InstallScript instead of using VBScript) ?
Labels (1)
0 Kudos
(3) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

InstallScript might be a better choice, but it's not available in the Express edition. However the main problem here is most likely your use of the wscript object. It is not available in the context of a VB custom action.
0 Kudos
sbaebler
Level 2

Thank you for your help. Unfortunately, the full version of Installshield is not an option for me.

So InstallScript seems to be the only possibility to achieve this?

By the way, is there a reference on which VBScript Commands can be used in Installshield?
0 Kudos
nc4ted
Level 3

You can use any VBScript commands you want in a custom action. Do you mean to ask what VBScript commands are available in InstallScript?

You can write a CA completely in VBS, then just load it into the Binary table. I'm not familiar with Express, but if it doesn't have the ability to create CAs, you can populate the CustomAction table with the Direct Editor (then sequence it properly), or using Orca as described in my previous post.
0 Kudos