I have this line in my code:
objShell.Run("psexec \\hostx.domain.com -s -u hostx -p hostxpass diruse /s /m /* " & "d:\root\" & " > " & "d:\root\will\test.txt")
If I echo the command out, and just copy and paste it into a command prompt, the script executes as expected.
However, if I run it using the above code, the command executes fine BUT it does not pipe it out into a file. To double check, I made sure the program ran a longtime, and in the title bar it said \\hostx.domain.com -s -u hostx -p hostxpass diruse /s /m /* d:\root\ > d:\root\will\test.txt
Does anybody have any idea why the pipe out is working if I execute it from the command prompt, but not from the Run method?