RE: call rsh from .NET - source code?
From: Cowboy (Gregory A. Beamer) - MVP (NoSpamMgbworld_at_comcast.netNoSpamM)
Date: 03/01/05
- Next message: Steven Moncayo: "Re: Insert new Row DataGrid WindowsForm"
- Previous message: Cowboy (Gregory A. Beamer) - MVP: "RE: We run into a strange problem..."
- In reply to: David Thielen: "RE: call rsh from .NET - source code?"
- Next in thread: David Thielen: "RE: call rsh from .NET - source code?"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 1 Mar 2005 06:39:02 -0800
With an API? It might be possible, but I do not know of any way. The Process
object is not the greatest methodology, necessarily, but it does allow you to
use standard in and standard out. Admitedly, it is effectively the same as
calling the command line from a command prompt (except programatically).
We use it regularly and have found the only time it causes us problems is
when the process finishes in a fraction of a second and does not leave time
to query standard out. In those situations, if the executable allows, we
write to a log and parse it. Yes, it is not an extremely sexy methodology,
but it works fairly easy, is easily maintainable and the learning curve is
not that high. The same problem could rear its ugly head through API calls,
however.
--- Gregory A. Beamer MVP; MCP: +I, SE, SD, DBA *************************** Think Outside the Box! *************************** "David Thielen" wrote: > Hi; > > I thought of this but I was hoping there was a way to do it without calling > rsh on the command line as that provides one more place things can go wrong > (rsh.exe not found, command line problem, etc.) > > Is there a way to do this where I just call an API? > > thanks - dave > > > "Cowboy (Gregory A. Beamer) - MVP" wrote: > > > Look at the Process object in the .NET help file. It will give you a basic > > idea of how to connect to any command line process. Sample: > > > > http://www.codeproject.com/csharp/Csharp_CVS_Interface.asp > > > > > > --- > > > > Gregory A. Beamer > > MVP; MCP: +I, SE, SD, DBA > > > > *************************** > > Think Outside the Box! > > *************************** > > > > "David Thielen" wrote: > > > > > Hi; > > > > > > Can anyone point me at some source code for calling rsh on both Windows and > > > unix servers where I pass in the command & arguments and get back the > > > standard output & error? > > > > > > -- > > > thanks - dave
- Next message: Steven Moncayo: "Re: Insert new Row DataGrid WindowsForm"
- Previous message: Cowboy (Gregory A. Beamer) - MVP: "RE: We run into a strange problem..."
- In reply to: David Thielen: "RE: call rsh from .NET - source code?"
- Next in thread: David Thielen: "RE: call rsh from .NET - source code?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|