Question Need help making button connect/disconnect to/from a VPN connection

t3kizzleee

New member
Joined
Jan 13, 2010
Messages
4
Programming Experience
Beginner
Hello,

I have a VPN connection set up on my computer.

I am trying to make a button in my VB.NET program to connect/disconnect to/from the VPN connection.

I have tried making a shortcut to the VPN on my desktop and calling it with the Shell method but I get an error saying file not found.

I have also added the shortcut extension ".lnk" and still have the same error.

I think it's a problem that it is in "Network Connections"

Is there anyway to call a connection from there?

Any help would be appreciated.

Thanks.
 
VB.NET:
Process.Start("RasPhone.exe","-d connectionName")

-h disconnects

Another option to consider would be checking out this .Net project: DotRas
 
Back
Top