Link to home
Start Free TrialLog in
Avatar of paulsiew
paulsiew

asked on

oShell.ShellExecute problem

Hi,

I want my php script to execute an exe file at the client's machine, i use oShell.ShellExecute() (activeX) to call the exe file, but it display an error msg saying permission denied. I suspect this because of the windows security updates that disabled the oShell.ShellExecute() fucntion.

Here is my code,
      <script language=\"JavaScript\"  type=\"text/javascript\">
        function executeCommands()
         {
        // Instantiate the Shell object and invoke its execute method.
      
          var oShell = new ActiveXObject(\"Shell.Application\");
      
          var commandtoRun = \"C:\\dial.exe\";
            var commandParms1 = document.dialform.CRMID.value;
            var commandParms2 = document.dialform.CallNo.value;
      
            var b = commandParms2 + \",\" + commandParms1;
      
       // Invoke the execute method.  
           oShell.ShellExecute(commandtoRun, b,\"\", \"open\", \"1\");
        }
      </script>

<input type=Button name=Button2 value="Call Now" onClick="executeCommands(' + hasPARMS + ')">
Avatar of paulsiew
paulsiew

ASKER

reset my intranet security level or enable activeX?
ASKER CERTIFIED SOLUTION
Avatar of RayDee
RayDee

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