• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 642
  • Last Modified:

problem with shell.application


I have the following javascript which is supposed to execute a program myprog.exe

<script language="JScript">
    function executeprog()
         var objShell = new ActiveXObject("Shell.Application");    <--- problem
         objShell.ShellExecute("c:\\myprog.exe", "", "", "open", 1);

<body OnLoad="executeprog();self.close();"></body>

It works on 1 pc but on another one i got an error saying:
"Automation Server can't create object".
 I checked my security options and it's set to allow to run activex components.

And  : I only get this error message on shell.application object..

I think something is missing on that pc. I tried to reinstall the Windows Scripting Engine but with no effect.

Anyone knows what could be the problem??

Thanx in advance
  • 4
  • 3
1 Solution
ZvonkoSystems architectCommented:
Look in the status bar of the browser. If you see in the Zone field the label: Local, then it will perhaps run, otherwise not.

mkraanAuthor Commented:
The script doesn't work for local and internet zone.

But i can run other activex objects like

 var objShell = new ActiveXObject("Word.Application");    

The problem only appears with

 var objShell = new ActiveXObject("Shell.Application");  
mkraanAuthor Commented:
ok i found the solution

The activex key was set to disabled in the registry

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\{13709620-C279-11CE-A49E-444553540000}
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

ZvonkoSystems architectCommented:
Thanks for the feedback.
You can ask here for refund: http:/Community_Support/askQuestion.jsp
mkraanAuthor Commented:
Thank u 2 for help Zvonko,
I will ask admins to close topic.
ZvonkoSystems architectCommented:
No objections.
PAQ-ing the question and refunding 500 points

Thanks  Zvonko.

The Experts Exchange
Community Support Moderator of all Ages

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now