Compartilhar via


Stepping through an example Switch.inf script

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

Stepping through an example Switch.inf script

This section describes each part of the generic script provided in the Switch.inf file.

Every script must start with a command to the remote computer, followed by one or more response lines. This initial command might be simply to wait for the remote computer to initialize and send its logon banner. The default initial command is to wait two seconds for the logon banner. It appears as follows in the Switch.inf file:

COMMAND=

If the response (the logon banner from the remote computer) is the following:

Welcome to A. Datum Corporation. Please enter your login:

then the corresponding response line in the Switch.inf file should be:

OK=<match>"Please enter your login:"

If the remote computer sends the "Please enter your login:" string, then this indicates that everything is correct. You respond by sending a command with the characters in your user name and the carriage return, as follows:

COMMAND=Martha<cr>

If the response from the remote computer is the following:

Please enter your password:

then the corresponding response line in the Switch.inf file should be:

OK=<match>"Please enter your password:"

To send your password, you send the following command:

COMMAND=mUs3naB<cr>

On many PPP computers, this script automatically logs you on.

For information about activating a Switch.inf script, see Activate a logon script. For more information about Switch.inf scripts, see Automating the Dial-up Logon Process by Using Switch.inf Scripts.