Network connections

  • Thread starter Thread starter the nitewolf
  • Start date Start date
T

the nitewolf

Okay, I am out of ideas, from a console application, how
do you invoke a dial-up or vpn connection, I can invoke
them from a command prompt doing "start
connectionname.lnk" and run it from a shortcut, but from
within my app or even from a batchfile, it won't work, and
I cannot find anything on the subject. Please help!!
 
Try This
System.Diagnostics.Process.Start("connectionname.lnk")

OHM


the said:
Okay, I am out of ideas, from a console application, how
do you invoke a dial-up or vpn connection, I can invoke
them from a command prompt doing "start
connectionname.lnk" and run it from a shortcut, but from
within my app or even from a batchfile, it won't work, and
I cannot find anything on the subject. Please help!!

Regards - OHM# OneHandedMan{at}BTInternet{dot}com
 
or look at shelling out the "rasdial" command.

Syntax is:

rasdial /?
USAGE:
rasdial entryname [username [password|*]] [/DOMAIN:domain]
[/PHONE:phonenumber] [/CALLBACK:callbacknumber]
[/PHONEBOOK:phonebookfile] [/PREFIXSUFFIX]

rasdial [entryname] /DISCONNECT

Where "entryname" is the name in the Dial up Connections list.

hth.

Simon
 
Back
Top