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

vbscript

Hi,

When i run a vbscript in Custom Actions "After Install Welcome dialog", installation will be aborted.
Vbscrip running in debug mode but abort in Installation mode.
In the following line terminates the installation:

Dim sScriptName
sScriptName = WScript.ScriptFullName <- abort :mad:

Does anyone know of this problem?

regards cady_nu
Labels (1)
0 Kudos
(4) Replies
hidenori
Level 17

The Windows Installer runs script custom actions directly and does not use the Windows Script Host. The WScript object cannot be used inside a script custom action because this object is provided by the Windows Script Host. Objects in the Windows Script Host object model can only be used in custom actions if Windows Script Host is installed on the computer by creating new instances of the object, with a call to CreateObject, and providing the ProgId of the object (for example "WScript.Shell"). Depending on the type of script custom action, access to some objects and methods of the Windows Script Host object model may be denied for security reasons.
0 Kudos
cady_nu
Level 2

I would like to find out via VBScript the run path of the setup.exe.

How can i create a new WScript Object to read the propertie .ScriptFullName?
Or is there another solution?

Regards cady_nu
0 Kudos
hidenori
Level 17

Try the SETUPEXEDIR property. To get the value of the property, use the Property property of the Session object.
0 Kudos
cecieacota2
Level 2

Thanks for the info!!
0 Kudos