By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,501 Members | 1,660 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,501 IT Pros & Developers. It's quick & easy.

myProcess.StartInfo.FileName==@"C:\WINDOWS\system3 2\ping.exe 10.0.0.1"; blank is not allowed?

P: n/a
myProcess.StartInfo.FileName==@"C:\WINDOWS\system3 2\ping.exe 10.0.0.1";
//this will not work cant find file name...

myProcess.StartInfo.FileName==@"C:\WINDOWS\system3 2\ping.exe"; //this works
myProcess.StartInfo.RedirectStandardOutput = true;
myProcess.StartInfo.Verb="10.0.0.1";

// myProcess.StartInfo.Verb = "Print";
myProcess.StartInfo.CreateNoWindow = true;
myProcess.StartInfo.UseShellExecute=false;
myProcess.Start();

string output =myProcess.StandardOutput.ReadToEnd();
System.Console.WriteLine(output);

--
Tech Servant James Pang.
Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"FileName" contains the name of the executable file you're calling.
parameters cannot be passed in via this string... in your instance ping.exe
is the executable and the ip address is the parameter.
"James Pang" <news.microsoft.com> wrote in message
news:Ot**************@TK2MSFTNGP15.phx.gbl...
myProcess.StartInfo.FileName==@"C:\WINDOWS\system3 2\ping.exe 10.0.0.1";
//this will not work cant find file name...

myProcess.StartInfo.FileName==@"C:\WINDOWS\system3 2\ping.exe"; //this
works
myProcess.StartInfo.RedirectStandardOutput = true;
myProcess.StartInfo.Verb="10.0.0.1";

// myProcess.StartInfo.Verb = "Print";
myProcess.StartInfo.CreateNoWindow = true;
myProcess.StartInfo.UseShellExecute=false;
myProcess.Start();

string output =myProcess.StandardOutput.ReadToEnd();
System.Console.WriteLine(output);

--
Tech Servant James Pang.

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.