View Full Version : Launch and terminate applications during installation

01-30-2008, 04:39 AM

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


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) ?

01-31-2008, 12:10 PM
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.

01-31-2008, 12:17 PM
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?

01-31-2008, 01:47 PM
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.