|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Output from process.startHow can I get the output from a process.start.
Example: Process.Start("c:\windows\system32\rp", PrintQueue & " " & filename, Username, pass, ComputerName) How do I get the output of this into a string? "Philip Wagenaar" <philip.wagenaar@online.nospam> schrieb: <URL:http://dotnet.mvps.org/dotnet/samples/misc/RedirectConsole.zip>> How can I get the output from a process.start. > > Example: > > Process.Start("c:\windows\system32\rp", PrintQueue & " " & filename, > Username, pass, ComputerName) -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> "Philip Wagenaar" <philip.wagenaar@online.nospam> wrote in message Look into launching your process using the ProcessStartInfo class :news:CA7C3A36-A747-4B83-95F7-FEBD0F78F4B0@microsoft.com... > How can I get the output from a process.start. > Example: > Process.Start("c:\windows\system32\rp", PrintQueue & " " & filename, > Username, pass, ComputerName) > > How do I get the output of this into a string? Dim starter as New ProcessStartInfo( _ "rp" _ , PrintQueue & " " & filename _ & " " Username _ & " " & pass _ & " " & ComputerName _ ) With starter .WorkingDirectory = "c:\windows\system32" .RedirectStandardOutput End With Process.Start( starter ) Process.WaitForExit() If Process.StandardOutput.ReadToEnd().IndexOf( "ERROR" ) > -1 Then ' Oops End If HTH, Phill W.
MsgBox("test") no msg box?
Type 'OleDbConnection' no define Getting the hWnd of an IE window from an NT service The free format? Variable that holds the record count of a result set? Question on Dataset navigation vb.net Generate all possible maches from a regular expression. Confusion: VB Express/VC Express/Sql Server Express Edition Using control array run time with different control names How to know if Windows firewall is on or off? |
|||||||||||||||||||||||