473,467 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 6687
"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: 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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.