Link to home
Start Free TrialLog in
Avatar of mkraan
mkraan

asked on

problem with shell.application

Hello,

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);
    }
</script>

<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
Avatar of Zvonko
Zvonko
Flag of North Macedonia image

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.

 
Avatar of mkraan
mkraan

ASKER

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");  
Avatar of mkraan

ASKER

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}
Thanks for the feedback.
You can ask here for refund: http:/Community_Support/askQuestion.jsp
Avatar of mkraan

ASKER

Thank u 2 for help Zvonko,
I will ask admins to close topic.
No objections.
ASKER CERTIFIED SOLUTION
Avatar of GranMod
GranMod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial