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.Appli cation"); <--- problem
objShell.ShellExecute("c:\ \myprog.ex e", "", "", "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
I have the following javascript which is supposed to execute a program myprog.exe
<script language="JScript">
function executeprog()
{
var objShell = new ActiveXObject("Shell.Appli
objShell.ShellExecute("c:\
}
</script>
<body OnLoad="executeprog();self
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
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.
ASKER
The script doesn't work for local and internet zone.
But i can run other activex objects like
var objShell = new ActiveXObject("Word.Applic ation");
The problem only appears with
var objShell = new ActiveXObject("Shell.Appli cation");
But i can run other activex objects like
var objShell = new ActiveXObject("Word.Applic
The problem only appears with
var objShell = new ActiveXObject("Shell.Appli
ASKER
ok i found the solution
The activex key was set to disabled in the registry
HKEY_LOCAL_MACHINE\SOFTWAR E\Microsof t\Internet Explorer\ActiveX Compatibility\{13709620-C2 79-11CE-A4 9E-4445535 40000}
The activex key was set to disabled in the registry
HKEY_LOCAL_MACHINE\SOFTWAR
How about the HTML version of the object:
http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_programming/objectmap.asp?frame=true
http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_programming/objectmap.asp?frame=true
Thanks for the feedback.
You can ask here for refund: http:/Community_Support/askQuestion.jsp
You can ask here for refund: http:/Community_Support/askQuestion.jsp
ASKER
Thank u 2 for help Zvonko,
I will ask admins to close topic.
I will ask admins to close topic.
No objections.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.