473,408 Members | 1,786 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

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

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
1 6685
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Richard Mayer | last post by:
After using a OpenFileDialog to locate a file within Visual Studio.Net, A System.Diagnostics.Process is created and the file information set using StartInfo. The process returns an error...
3
by: Szymon Madejczyk | last post by:
example code: public class envtest { public static void Main() { System.Diagnostics.Process proc = System.Diagnostics.Process.GetCurrentProcess(); string env =...
3
by: Jeff Jarrell | last post by:
I have an object to execute a process. its intent is to do a simple execute and capture stdin and stdout. Nothing fancy, not for long processes. simple. I expect to typically use it with a fully...
4
by: James Pang | last post by:
-- Tech Servant James Pang.
6
by: henk | last post by:
Hi, I want to show a message in my vb.net program when another windows program (eg calc.exe) is stopped by a user. with pList = myProcess.GetProcesses For Each myProcess In pList I can check...
2
by: XxLicherxX | last post by:
Hello everyone, Can someone tell me what this does and how I can use it? I can't seem to find any good examples online. Thanks
2
by: David | last post by:
I'm opening a cmd window to run an ftp process. It's easy enough to close the process (.close()), but the cmd window won't close unless I go out to the window and type 'quit'. How can I send a...
2
by: Alan T | last post by:
How do I make it does NOT appear on the task bar when it is started?
1
by: Analizer1 | last post by:
Hi...any body know what the max string length size when using Process.StartInfo.Arguments Example Process.StartInfo.FileName = "Wzzip.exe" Process.StartInfo.Arguments =...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.