How do I start a PPP session from a windows command line or app?
-
I am looking for a way to start and stop a PPP connection from a Windows (C++) application. I originally posted a similar question here[^] and was pointed to the Windows NETSH command. At first, that looked like what I needed but upon closer examination, did not fit the bill. :( I have an icon all set up in the networking control panel but I need to establish this connection via another program. That program also needs to disconnect that interface when it is finished. Any help or pointers would be greatly appreciated. Thanks!
-
I am looking for a way to start and stop a PPP connection from a Windows (C++) application. I originally posted a similar question here[^] and was pointed to the Windows NETSH command. At first, that looked like what I needed but upon closer examination, did not fit the bill. :( I have an icon all set up in the networking control panel but I need to establish this connection via another program. That program also needs to disconnect that interface when it is finished. Any help or pointers would be greatly appreciated. Thanks!
I found the answer and so I am posting it here for others.... The Windows utility is called RasDial (RasPhone looks like a phonebook front end to RasDial). From the command line, you can call rasdial "connection name" user pw /domain:d to make the connection. I tested it and successfully made a VPN connection to my workplace from home. It also works for my cellular modem card which is what I needed it to do. Looking through the MSDN docs, there appears to be an API with the Platform SDK that might also do it but I haven't tried it.