2

I'm trying to use an ActiveX control:

shell = new ActiveXObject("WScript.Shell");

But it is giving me an error:

Message: Automation server can't create object

What's going wrong?

Danny Beckett
  • 20,529
  • 24
  • 107
  • 134
Poonam Bhatt
  • 10,154
  • 16
  • 53
  • 72

1 Answers1

0

You should set the Internet Explorer Security Settings. Follow the seteps

  1. Go to Tools (or press Alt+X)
  2. Go to Internet Options
  3. Click on "Security" Tab. If you are loading your web site from internet, select "Internet" Icon, if you are loading your site form local computer select "Local Intranet"
  4. Click "Custom Level" Button
  5. find "Initialize and Script Activex controls not marked as safe for scripting" and select "Prompt" radio button and click ok.

thats all. cheerrs!!

Dehan Wjiesekara
  • 3,152
  • 3
  • 32
  • 46