Batch File for Scheduling Automatic Connection to BSNL Broadband for Night Downloads

by vbb on February 28, 2009

in Broadband

As already explained ,one of the advantage of bridge mode is easy scheduling.The methods to connect to BSNL broadband via bridge mode(by dialing) can also be accomplished through batch files.

Here are two batch scripts which are used to connect or disconnect your broadband connection.These scripts can also be scheduled at a particular time so that you connect to broadband only when you require.A must have for people who are using plans like 500C which give unlimited downloads in night hours.Note that this will work in Bridge mode only,so first configure your modem in bridge mode and then try this method.

Batch File for Connecting BSNL Broadband

Windows has a command to dial up your connection.Using the command ‘rasdial’
Here is the code which assumes that the  name of connection you made is “BSNL”

 rasdial BSNL user_name password

So if your user name is abc and password is ‘pwd’’ then the script will be

rasdial BSNL abc pwd

Now copy the above code and paste it into notepad.When you save the file click “save as” and in the file name write “connect.bat” including double quotes.The double quote will ensure that the file type is “bat” and not “txt” as happens with any file you save with notepad.The file icon should look like this figure.

batch file for connecting BSNL broadband

 Batch File for Disconnecting BSNL Broadband

Simply add /disconnect to the above batch file as follows-

rasdial BSNL /disconnect

Save this file as ‘disconnect.bat’

Make a new folder in C:/ drive and keep these batch files in the folder

Scheduling Automatic Connection Using These Batch Files

Here we can schedule automatic connection to broadband using the inbuilt Windows Task Scheduler.Here is how to do it.

  1. Open control panel=>Scheduled Task.Add scheduled Task.This will open ‘Scheduled Task Wizard’. Here you will see a list of programs which you can schedule.Click ‘Browse’ and go to the folder where you saved ‘connect.bat’ and select it.
  2. Give the task, a name say,connect1 and set the frequency say ‘daily’ and click next.
  3. Select the start time and start date.Start date will be today and set the start time to the time you get unlimited downloads.For BSNL set it to 02.10 am.
  4. In the next step it will ask for you computer user name and password.If you have  single user computer,this field will be filled already ,so click next.
  5. Tick ‘Open advanced properties for task when I click finish’ and click next.

You should see the window as follows-

scheduled task

Remember to tick ‘Run only if logged on’ and press OK.Now when you open control panel=>scheduled task,you should see you task listed there.

Similarly add “disconnect.bat” and schedule it  at 07.50 am.

Finally you should see your scheduled task windows as the following figure.

Here I have scheduled “connect.bat” three times as sometimes the connection fails in my region.

 scheduled task

Now just put your modem in ON condition and sleep peacefully.Your modem will automatically connect to broadband at the time you want and disconnect too at required time.Have a Good Night sleep.

Related posts:

  1. How to Create a PPPoE Dial-up Connection in Bridge Mode
  2. Free Scheduled Windows Shutdown Utility-Get Switch Off
  3. Automatic Scheduled Computer Shutdown-Windows XP and Vista
  4. BSNL Modem-Bridge vs PPPoE Mode
  5. How to Configure your BSNL modem in Bridge Mode

Enter your email address and subscribe for FREE updates

Or Get Full Updates through RSS Feed

{ 1 comment… read it below or add one }

Anonymous May 10, 2011 at 2:30 am

This is awsome……been using BSNL 500c plan for about 3 years and only now was I about able to ‘phrase’ my search the right way for finding a way to fix this bloody problem, which landed me on this site…..gr8 guys thnx a ton……:)


Leave a Comment

Previous post:

Next post: