Reputation: 396
In IE 8, When I use
new ActiveXObject("wscript.shell")
to create an ActiveX object there will be a script error stating "Automation server can't create object". This is because the wscript.shell is not secure for scripting and in the default security zone the user is not even asked for execution. Is it possible to ask the IE via javascript for the ActiveX security settings so that i can to avoid and handle the script error (and display a hint to the user?)
Upvotes: 2
Views: 466
Reputation: 47776
You could always catch the error?
var shell;
try {
shell = new ActiveXObject("wscript.shell")
}
catch (e) {
alert("You need to change your security settings")
}
Upvotes: 2