Wednesday, 2 October 2019

Connect to your broadband using win32 api using RasDial

So yesterday my router stopped working and new one will come in mail by today. Its one day that I was like without internet (not actually). I tried putting LAN directly to my laptop and connect to broadband. It worked like charm,  but the only problem I am facing now is connecting and disconnecting the connection. So, as a person who knows how to Google I tried finding a command to connect to internet by dialing up my broadband (PPPoE connection) and make it as a batch, just double click and it should work.

I found a command line utility called RasDial which is (RemoteAccessService). If you have already a network connection setup in your computer. you can directly open command prompt and type rasdial /? which gives you all the option to connect. If you have not done the setup yet you can check this link and do it.


Usage:
  1. Connection: rasdial <YourConnectionName>
  2. Status: rasdial
  3. Disconnection: rasdial <YourConnectionName> /disconnect
Pretty simple and straight forward. Please share what you think about it in the comments below.

No comments:

Post a Comment