Re: win32 process
- From: "Lynn" <MarryLynn@xxxxxxxxx>
- Date: Wed, 8 Mar 2006 00:26:22 +0800
if i use psexec, how can my vb.net code know that it has finished executing
so that i can move on to do the next stuff?
"Gerry Hickman" <gerry666uk@xxxxxxxxxxx> wrote in message
news:uf24PiWQGHA.5092@xxxxxxxxxxxxxxxxxxxxxxx
Hi Lynn,How
hi,
I am using Win32_Process to launch a batch file on a remote computer.
finished.can I know that the batch file has finished executing?
thanks
It's not as simple as it should be. One way is to use a loop which
checks for the existence of the Process ID in the Win32_Process list and
sleeps between checks. Once the Process ID is gone, you know it's
There's a free tool from SysInternals called PsExec though, which can be
much more powerful - it can actually communicate StdIn and StdOut with
the client - in other words you can actually see the output from the
batch file either on screen in real-time or sent to a log file for the
morning.
Another option is using WshRemote, but that's another story...
--
Gerry Hickman (London UK)
.
- Follow-Ups:
- Re: win32 process
- From: Gerry Hickman
- Re: win32 process
- From: Jason Gurtz
- Re: win32 process
- References:
- win32 process
- From: Lynn
- Re: win32 process
- From: Gerry Hickman
- win32 process
- Prev by Date: Re: Call Windows API in WMI?
- Next by Date: Re: win32 process
- Previous by thread: Re: win32 process
- Next by thread: Re: win32 process
- Index(es):
Relevant Pages
|