I can't seem to get around some annoying permission issues when I attempt to run a quick test where I call a batch file from my ASP script.
I'm running this on my XP Pro machine with IIS 5.1
Here is my test script (batchtest.asp):
Expand|Select|Wrap|Line Numbers
- <html>
- <body>
- <h1>
- <%
- Dim wshell
- Set wshell = Server.CreateObject("WScript.Shell")
- Call wshell.Run("C:\Inetpub\wwwroot\test2.bat",0,true)
- 'wshell.Run "C:\Inetpub\wwwroot\test2.bat"
- Set wshell = nothing
- %>
- </h1>
- </body>
- </html>
No matter what I do, I get a "permission denied" issue.
1) What is the correct syntax to run a system command? (You can see in my test script I have two scenarios)
2) Where does the batch file need to be? Can I place it in the same folder as my ASP script?
3) What permissions need to be set? Do I need to set permissions in IIS, the wwwroot folder, the batch file itself, etc...??
Thank you millions!!!
-Cryo