I have a button with this code
Process.Start("start system\now.exe")
Now I'd like to pass arguments from the Texbox but I dont know how . I've tried :
Process.Start("system\now.exe -connect -ip 127.0.0.1 -PORT 910 " & "-USER " & TextBox1.Text & "-PWD " & TextBox1.Text " -serial x4r7680")
But does not seem to work. Any idea guys?
You need to pass in a ProcessStartInfo object with the arguments. See the page in the MSDN docs for info on the ProcessStartInfo class.
Based on a cursory reading of the document, your example would look like this:
Dim startInfo as ProcessStartInfo("system\now.exe")
startInfo.Arguments = "-connect -ip 127.0.0.1 -PORT 910 " & "-USER " & TextBox1.Text & "-PWD " & TextBox1.Text " -serial x4r7680"
Process.Start(startInfo)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With