Bianchi928
asked on
Ouput to file
This little runs fine and I can see the display flashed on teh screen . How do I capture the infos and write it to a file
Set FSO = CreateObject("Scripting.Fi leSystemOb ject")
Set FTO = FSO.CreateTextFile("d:\log .txt", True)
Set WshShell = WScript.CreateObject ("WScript.Shell")
IPAddress = InputBox("Enter IP addresss :")
UserId = InputBox("Enter User ID :")
If IPAddress = "" or UserID = "" then
wscript.quit
End If
strcommand = "d:\psexec.exe \\" & ipaddress & " -u ?????\" & UserID & " -p ????? net use "
wshshell.run strcommand
Set FSO = CreateObject("Scripting.Fi
Set FTO = FSO.CreateTextFile("d:\log
Set WshShell = WScript.CreateObject ("WScript.Shell")
IPAddress = InputBox("Enter IP addresss :")
UserId = InputBox("Enter User ID :")
If IPAddress = "" or UserID = "" then
wscript.quit
End If
strcommand = "d:\psexec.exe \\" & ipaddress & " -u ?????\" & UserID & " -p ????? net use "
wshshell.run strcommand
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Cheers