Process start is not passing arguments?
I can connect when I go into command prompt manually and type:
rasdial one username password
This will work. It will dial and connect.
Now when I try doing this programmatically it will not work. It doesn't seem to be passing the arguments I've specified:
vb.net Code:
Public Shared Sub Dial()
Dim p As New Process()
p.StartInfo.CreateNoWindow = True
p.StartInfo.UseShellExecute = False
p.StartInfo.FileName = "cmd"
'command prompt launches, no arguments were passed though.
p.StartInfo.Arguments = "rasdial one username password"
p.Start()
End Sub
Re: Process start is not passing arguments?
Have you tried passing them all in the FileName property?
Re: Process start is not passing arguments?
does cmd TAKE arguements? all cmd does is give you a command prompt. Instead of using cms as the filename, it should be rasdial ... and your arguements should be "one username password" or what ever it needs to be.
-tg
Re: Process start is not passing arguments?
cmd does take arguments of what you want to pass to the command window. Its the arguments after rasdial which I would question as being received by rasdial and not cmd.
Re: Process start is not passing arguments?
Using "Rasdial" instead of "cmd" fixed it. Thanks guys.