最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Why WScript doesn't works? - Stack Overflow

programmeradmin3浏览0评论

If I try it in IE9 (win7), then it works perfectly, but when I try to run this code in IE8,7,6 (winXP) the debugger writes, that can't create the object.

var wscript = new ActiveXObject("WScript.Shell");

If you have any idea, then please share it with me.

Thanks in advance

If I try it in IE9 (win7), then it works perfectly, but when I try to run this code in IE8,7,6 (winXP) the debugger writes, that can't create the object.

var wscript = new ActiveXObject("WScript.Shell");

If you have any idea, then please share it with me.

Thanks in advance

Share Improve this question asked Feb 19, 2012 at 12:49 Danny FoxDanny Fox 40.8k29 gold badges71 silver badges96 bronze badges 2
  • can you post the plete error? – Dor Cohen Commented Feb 19, 2012 at 12:54
  • 4 see stackoverflow./questions/2138002/… – powtac Commented Feb 19, 2012 at 12:54
Add a ment  | 

1 Answer 1

Reset to default 6 +25

This is likely an error with the security settings in your Windows XP test machine. Accessing WScript is a highly protected action because it exposes your puter essentially to plete takeover. What you're seeing isn't a difference between a version of IE, but a difference between either the OS (Win7 -> WinXP) or more likely the configuration setup between the two.

Make sure ActiveX is setup correctly: How to config IE to make "wscript.shell" work (by "correctly" I mean "with security disabled" which most people would say is changing it to be incorrect).

发布评论

评论列表(0)

  1. 暂无评论