Automating Remote Logons Using SWITCH.INF Scripts

You can use the SWITCH.INF file (or PAD.INF on X.25 networks) to automate the logon process instead of using the manual RAS Terminal window described in the preceding section,"Using RAS Terminal for Remote Logons."

Automated scripts are especially useful when a constant connection to a remote computer is needed. If a remote connection fails, RAS automatically redials the number and reestablishes the connection if the RAS entry is configured to use a script. However, this is only true for non-SLIP connections. Scripts are also timesavers if you frequently log on to a remote system, and do not want to manually log on each time.

The script language described in this chapter was also designed to communicate with other devices, including modems. If you are not familiar with modem scripts, scripting can be difficult to understand. The following section explains how to create scripts, although you will probably find it easiest to copy, then modify, one of the generic sample scripts.

The SWITCH.INF file provides a generic script that will probably work with little or no modification when connecting to many PPP servers. It is recommended that you first try to connect using the generic script. Then, if that does not work, you can copy, then modify the generic script to match the logon sequence of the remote computer you want to connect to.

The first step in automating a remote logon is creating a script in the SWITCH.INF file. Then you must enable the script by selecting it in the Before Dialing or After Dialing boxes in the Security Settings dialog box. The After Dialing box applies in most cases. For directions about activating the generic script provided in RAS, see "Activating SWITCH.INF Scripts" later in this chapter.