I need the correct way to accomplish this via a vbscript.
This works fine from command prompt:
psexec \\99.99.99.99 -u username -p password cmd.exe /c ver > output.txt
From the vbscript:
sTempFile = objFSO.GetTempName
sCmd = "psexec \\" & sIP & " -u " & sDomain & "\" & sUser & " -p " & sPassword & " cmd /c ver > " & sTempFile
WSHShell.Run sCmd, 1, True
I always get a runtime error: File not found
Thanks, Sam