var wshShell = new ActiveXObject("Wscript.Shell");会报错,说:Automation Server can't create Object。
这个是因为IE的安全级别设置问题,修改可以解决:
选择:Internet Explorer , Tools, Internet options, Security, custom level,
选中: enable "Initializing and Script Activex controls not marked as safe"
通过降低安全级别来正确运行。
本文介绍了一个常见问题:使用varwshShell=newActiveXObject(Wscript.Shell)时出现的AutomationServercan'tcreateObject错误,并提供了解决方案。通过调整Internet Explorer的安全设置,启用未标记为安全的ActiveX控件初始化和脚本编写,可以避免该错误。
79

被折叠的 条评论
为什么被折叠?



