Hi Guys,
I'm getting partial success running this code. Problem is that it starts off as expected, but just then hangs.
Here is the code:
As I said above the code begins to work and this is the output I get:
However after this, the program just hangs and there is not any further output.
Any help would be great.
Cheers
I'm getting partial success running this code. Problem is that it starts off as expected, but just then hangs.
Here is the code:
Code:
Dim remoteTool
remoteTool="\\pluto\tools\psexec.exe"
StrServer="jupiter"
Call vspDel(StrServer)
Sub vspDel(StrServer)
Set objShell = WScript.CreateObject("Wscript.Shell")
Set objExecObject = objShell.Exec("%comspec% /k " & remoteTool & " \\"&StrServer& " -c -f -d c:\tools\handle.exe")
Do Until objExecObject.StdOut.AtEndOfStream
strLine = objExecObject.StdOut.ReadLine()
WScript.Echo strLine
Loop
End Sub
As I said above the code begins to work and this is the output I get:
Code:
PsExec v1.3 - execute processes remotely
Copyright (C) 2001 Mark Russinovich
[URL unfurl="true"]www.sysinternals.com[/URL]
Connecting to lon3558xns... Starting PsExec service on lon3558xns... Connecting with PsExec service on lon3558xns... Copying c:\tools\handle.exe to lon3558xns... Starting c:\tools\handle.exe on lon3558xns...
handle.exe started on lon3558xns with process ID 3644.
However after this, the program just hangs and there is not any further output.
Any help would be great.
Cheers