WScript problem running command prompt
Posted on 2007-10-03
I have the following code I'm trying to call from an asp script:
shellCommand = "cmd.exe /c dir > c:\temp\a.txt"
i = oScript.Run (shellCommand, 0, True)
The value for i is always 1, indicating an error, although no error messages appear, and c:\a.txt does not appear.. I've set up full permissions to the IUSR account on c:\temp and also gave full permissions to the IUSR account on cmd.exe. cmd.exe is in my system path, and if i omit the /c switch (which closes the cmd window once its done), I see the cmd.exe in the task manager so i know its running.