This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Can't create object in custom acrion's script
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Oct 19, 2010
02:35 AM
Can't create object in custom acrion's script
Hi all,
i have a big problem. I have a script in custom action, but i can't run it. I get an error when i try to create an object for shell:
Set wshShell = WScript.CreateObject( "WScript.Shell" )
If i run that script alone, it works fine. What must i do to execute the script. I've call an install with administrator rights.
Thanks in advance
i have a big problem. I have a script in custom action, but i can't run it. I get an error when i try to create an object for shell:
Set wshShell = WScript.CreateObject( "WScript.Shell" )
If i run that script alone, it works fine. What must i do to execute the script. I've call an install with administrator rights.
Thanks in advance
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Oct 20, 2010
09:44 AM
Hi,
The 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.
This is documented in the InstallShield Limited Edition help Library at section:
Windows Installer->Windows Installer Guide->Custom Actions->About Custom Actions->Scripts
Thanks,
Lenwin
The 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.
This is documented in the InstallShield Limited Edition help Library at section:
Windows Installer->Windows Installer Guide->Custom Actions->About Custom Actions->Scripts
Thanks,
Lenwin
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)