WScript.run output redirect fails
Posted on 2004-10-12
I am trying to call a command from WScript.run and redirect that command's output to a file.
When I call:
errCode = oShell.run("%comspec% /c nslookup " & ipStr,0,True)
everything goes fine and errCode gets a zero. When I try:
errCode = oShell.run("%comspec% /c nslookup " & ipStr & " > " & filePath,0,True)
errCode gets a 1. I have tried setting IIS to use the Administrator account for Anynomous Access thinking that this an issue of write permissions, but this didn't solve the problem. When I enter the command in the run box, everything works as expected.
Please help. Thanks.