Hi all,
I have a windows service responsible for running processes on a remote machine with capturing the output,
I googled for that and read a lot of articles and threads,
I found two ways:
1) using WMI for call the remote process like this example: http://www.codeproject.com/KB/cs/EverythingInWmi02.aspx
2) using the PsExec tool by System.Diagnostic.Process class
ever way of these has many problems,
the WMI doesn't support returning the output and doesn't support "WaitingToExit" It just call the process and return the PId,
and the PsExec couldn't capture the output programmatically by System.Diagnostic.Process in a clear way, I found only workarounds like redirect the output to a file then read the redirected file..etc,
I need a real solution please