Vbscript 为什么WScript.CreateObject(“WScript.Shell”)会崩溃?
你认为这条线路会崩溃的原因是什么 设置oShell=WScript.CreateObject(“WScript.Shell”) 。。。仅当我作为自定义操作从InstallShieldXPress启动脚本时Vbscript 为什么WScript.CreateObject(“WScript.Shell”)会崩溃?,vbscript,installshield,Vbscript,Installshield,你认为这条线路会崩溃的原因是什么 设置oShell=WScript.CreateObject(“WScript.Shell”) 。。。仅当我作为自定义操作从InstallShieldXPress启动脚本时 MsgBox "before create ObjectShell" Set oShell = WScript.CreateObject ("WScript.Shell") MsgBox "after create ObjectShell" 我从未看到“创建ObjectShell后”消息-(
MsgBox "before create ObjectShell"
Set oShell = WScript.CreateObject ("WScript.Shell")
MsgBox "after create ObjectShell"
我从未看到“创建ObjectShell后”消息-(
如果我只是在windows资源管理器中双击脚本文件来启动脚本,当然一切正常。可能是全局
WScript
对象在InstallShield环境中不可用。您可以使用如下脚本来检查:
MsgBox Not IsEmpty(WScript) ' True if WScript is defined, False if it's undefined
如果未定义
WScript
,请尝试改用CreateObject(“WScript.Shell”)
。另请参见更正,InstallShield不支持WScript。