The switch.inf File

Under Windows NT 3.5, all PPP logon scripts were defined in the switch.inf file, located in the C:\winnt\system32\ras directory.[51]

This file contained all of the logon scripts. Windows NT 4.0 added the new, more complete scripting language that was discussed in the beginning of the appendix, but it maintained support for the switch.inf file to ensure backward compatibility. The switch.inf scripting language is adequate for most simple script situations.

To create a new script in the switch.inf file, go to the Script tab of the Dial-Up Networking configuration. Click the Edit script button. This opens an editor with the switch.inf file. The new script is a new section in the switch.inf file.

Each script begins with a section header that provides the name used to invoke the script, which is the simple name entered in the listbox on the Script tab. The section header is the script’s name enclosed in square brackets. For example, a script for logging into your office network with PPP might have the header:

[OfficePPP]

The body of the script follows the header. It defines what you expect to receive from the remote system using the OK statement, and what the local system sends in response to the expected values using the COMMAND statement. The OK and COMMAND keywords are always entered in upper case, as the following syntax shows:

OK=expect
COMMAND=[send]

expect is the value expected from the remote system by the OK statement. send is the value sent to the remote system ...

Get Windows NT TCP/IP Network Administration now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.