Scheduling a RAS Connection Using the AT Command

ID: Q174769


The information in this article applies to:


SUMMARY

This article discusses a method for using the AT command, from the MS-DOS command prompt, to automatically dial a Remote Access Service (RAS) phonebook entry at a scheduled time.


MORE INFORMATION

The AT command may be used to schedule or automate commands such as those used to make dial-out connections through RAS. To configure the AT command to dial-out using one of your RAS phonebook entries, perform the following steps:

  1. Create a batch file using Edit.com that contains the following:
    
          %Systemroot%\System32\Rasphone -d <phonebook entry name>
     
    Where <phonebook entry name> is the name of the phonebook entry that you want to automatically dial. If your phonebook entry contains spaces, you must enclose it in quotations, such as "My Phonebook Entry".

    NOTE: Using Edit.com will ensure that Unicode characters are not embedded within the batch file that you create.


  2. Type the following at a command prompt and press Enter:

    AT <time of day> /interactive <file name>

    Where <time of day> is the time that you would like this command to run and where <file name> is the path to and the name of the batch file that you created in step 1 above.


NOTE: The first time the batch file is run using the AT command, Rasphone.exe will request the user name, password, and domain name. This is because the AT command uses the Windows NT System account and not a user account. Because the System account has not performed the dial-up previously, you will be prompted for logon information. If you save the password during the first dial-up, the System account will not prompt you again.

If the steps above are not followed correctly, you may see the following event log message in Event Viewer:

   Event ID: 7901
   Source: Scheduler
   Description: The <file name> command failed to start due to the
                following error: The system cannot find the file specified. 


Where <file name> is the same as that specified in step 2 above.


Keywords          : ntras kbhowto nthowto ntnetserv NTSrvWkst 
Version           : WinNT:3.5,3.51,4.0
Platform          : winnt 
Issue type        : kbinfo 

Last Reviewed: January 19, 1999