Results 1 to 4 of 4

Thread: Multiple arguements

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2005
    Posts
    104

    Multiple arguements

    Im trying to give my application the option to add routes, using the command line util route add.

    But to add a route i obviously need to use "route add -p 123.456.789.000 mask 255.225.255.0 987.654.321.000" (Numbers just examples)

    I have so far.

    VB Code:
    1. Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
    2.         txtIp.Text = ""
    3.         txtMask.Text = ""
    4.         txtGate.Text = ""
    5.     End Sub
    6.  
    7.     Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
    8.         Dim a As New Process
    9.         a.StartInfo.FileName = "route.exe"
    10.         a.StartInfo.Arguments = "add"
    11.         a.StartInfo.CreateNoWindow = True
    12.         a.StartInfo.UseShellExecute = False
    13.         a.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
    14.         a.Start()
    15.     End Sub

    thanks for any help.

    Jason
    VB.Net 2005

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Multiple arguements

    The entire command line except the file name goes in the Arguments property.
    VB Code:
    1. a.StartInfo.Arguments = "add -p 123.456.789.000 255.225.255.0 987.654.321.000"
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2005
    Posts
    104

    Re: Multiple arguements

    Ok thanks but what about if the addresses come from text boxes?
    VB.Net 2005

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Multiple arguements

    It's just a string that you're assigning to the Arguments property so you can easily construct it by concatenating the contents of TextBoxes or whatever.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width