Passing Arguments to Process.Start

rkmden

New member
Joined
Jan 29, 2006
Messages
3
Programming Experience
1-3
Hi, John

Thanks for the information regarding Process.Start, That will work, but do you have any ideas, on making it work with check boxes.

Example.

form section Ping.

cmd command Ping

will capture ip address from textbox,

then have checkboxes

1) -t
2) -a
3) -n
Syntax

ping [-t] [-a] [-n Count] [-l Size] [-f] [-i TTL] [-v TOS] [-r Count] [-s Count] [{-j HostList | -k HostList}] [-w Timeout] [TargetName]
Top of page
Parameters

-t: Specifies that ping continue sending Echo Request messages to the destination until interrupted. To interrupt and display statistics, press CTRL-BREAK. To interrupt and quit ping, press CTRL-C.
-a: Specifies that reverse name resolution is performed on the destination IP address. If this is successful, ping displays the corresponding host name.
-nCount: Specifies the number of Echo Request messages sent. The default is 4.
-l Size: Specifies the length, in bytes, of the Data field in the Echo Request messages sent. The default is 32. The maximum size is 65,527.

John,

Here is a program that does something like I would like to do.

Using the Windows XP IP Configuration Tool
To launch the Windows XP IP Configuration Tool, just double-click WXP-IPConfig.hta.
The Windows XP IP Configuration Tool dialog box has a single panel containing a set of option buttons and text boxes that allow you to configure your Ipconfig command line. When you click OK, you'll see the Ipconfig command line and be prompted to launch it. When you do, a Command Prompt window will open and display the results.

Thanks again for your help,

Tam
 
i would set up a form with the checkbox's (chkT, chkA, chkN) then when the button is clicked check each checkbox to build the arguement's string:
VB.NET:
Dim strArgs As String = ""

If chkT.Checked = True Then strArgs &= "-t "
If chkA.Checked = True Then strArgs &= "-a "
If chkN.Checked = True Then strArgs &= "-n " & txtCount.Text 'The "N" arg requires additional information to be passed

Process.Start("ping.exe", strArgs)
 

Similar threads

Back
Top