Tuesday, March 26, 2013

Dial-up connection using Command prompt

Connecting to internet using mobile partner or some other program is simple. But it consumes your system resources(around 200 MB of RAM). You can simply save your resources by using command prompt. This method is applicable only on Windows platform.

First, install the device driver and create the dial-up connection, or just install the mobile partner(or software that came along with your modem) and connect using it(it will automatically create the dial-up connection). now you can exit that program.

Here is the procedure to connect using command prompt:

  • Open command prompt
  • Type the following command
rasdial "CONNECTION NAME"
Ex: rasdial "TATA DOCOMO INTERNET"

To disconnect,
rasdial "CONNECTION NAME" /Disconnect

You can also automate this process by creating batch file.
Connect
Open any text editor and copy the following code

:Redial
rasdial "CONNECTION NAME"
if %errorlevel% == 0 exit
goto Redial;
Replace the CONNECTION NAME with your connection name(you can rename it) and save it as connect.bat

Disconnect
Open any text editor and type the following
rasdial "CONNECTION NAME" /Disconnect
exit

Replace the CONNECTION NAME with your connection name(you can rename it) and save it as disconnect.bat

Save them at the location of your convenience and just double click them to connect and disconnect a dial-up connection.