How can I create a RAS Connection Script?
March 4, 1999
A. A. It is possible to write a script that will run when you connect during a RAS connection to automate actions such as entering your username and password. To specify a script perform the following
Double click on My Computer and start up the Dial-up Networking applet
Select the phonebook entry and click More.
From the More menu select "Edit entry and modem properties"
Click the Script tab and select "Run this script"
Click the "Edit script..." button and the SWITCH.INF file will be opened
Go to the bottom of the file and create a new connection section and then select exit
Answer Yes to save changes
Click the "Refresh List" button and the new entry will now be displayed.
Select the new entry you created and click OK.
An example addition to the SWITCH.INF would be
; the phonebook entry
[Savill1]
; send initial carriage return
COMMAND=
; wait for : (after username, may be different at your site) omit the U as it may be capitals. You could just have :
OK="sername:"
LOOP=
; send username as entered in the connection dialog box, alternaticly you could just enter the username e.g. savillj
COMMAND=
; wait for : (after password this time, may be different at your site)
OK="assword:"
LOOP=
; send the password entered in the connection dialog box, again you could just manually enter the password, e.g. password
COMMAND=
NoResponse
; send the "start ppp" command
COMMAND=ppp default
OK=
In depth information on all of the commands can be found in the SWITCH.INF file.
About the Author
You May Also Like