Do you think of any reason that this line should crash:
Set oShell = WScript.CreateObject (“WScript.Shell”)
… only if I launch the script from InstallShieldExpress as a custom-action.
MsgBox "before create ObjectShell"
Set oShell = WScript.CreateObject ("WScript.Shell")
MsgBox "after create ObjectShell"
I never see the “after create ObjectShell” message ;-(
and if I simply launch the script by double-clicking on the script file in a windows explorer, of course everything is ok.
It may be that the global
WScriptobject isn’t available in the InstallShield environment. You can check this using a script like this:If
WScriptis undefined, try usingCreateObject("WScript.Shell")instead. See also What is the difference between CreateObject and Wscript.CreateObject?