
April 11th, 2003, 09:44 PM
|
|
Registered User
|
|
Join Date: Apr 2003
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Running a .exe from Javascript (using ASP & IIS)
This is the code I'm using to run Notepad from Javascript. This works just fine when I run it outside of IIS (just double click on the file). However, when I run through IIS, it gives an error (permission denied).<br><br>I tried setting every IIS security setting to the bare minimum, and selected the option that allows you to run both scripts and executables, but it still won't work.<br><br>Does anyone know the IIS setting(s) that I can change to get this to work?<br>Or is it something built in that I can't change?<br><br>(this is the Javacript script)<br> function executeCommands(inputparms)<br> {<br> // Instantiate the Shell object and invoke its execute method.<br><br> var oShell = new ActiveXObject("Shell.Application");<br><br> var commandtoRun = "c:\windows\Notepad.exe";<br> if (inputparms != "")<br> {<br> var commandParms = document.Form1.filename.value;<br> }<br><br> // Invoke the execute method. <br> oShell.ShellExecute(commandtoRun, commandParms, "", "open", "1");<br> }<br><br>Dak <img border="0" src="/forum/emoticons/jumpin.gif" height="31" width="31" alt="jumpin" />
|