Automating a Dial-Up Networking connection

You can create a Dial-Up Networking script to automate the process of connecting to an Internet access provider, online service, or remote computer.

To begin creating a Dial-Up Networking script, click a button. For an overview of scripting, click Overview of Scripting For Dial-Up Networking.

Creating a script file

Assigning a script file to a Dial-Up Networking connection

Overview of scripting for Dial-Up Networking


Overview of scripting for Dial-Up Networking

Many Internet service providers and online services require you to enter information, such as your user name and password, to establish a connection. You can create a Dial-Up Networking script that provides this information to your service or provider automatically so you do not need to type it in each time you connect.

To create a Dial-Up Networking script, you use a text editor, such as Notepad, to create a script file, and then you use the Dial-Up Scripting Tool to assign the script file to a Dial-Up Networking connection you have established.


To create a script file

1	Click here  [image]  to start Notepad.

Or, open a new file in any text editor you want.

2	Type the scripting commands that provide the information required by your Internet access provider, online service, or the computer you want to connect to.

For a list of commands and what they do, click Scripting Commands.

3	Save the file using any name.

Tip

To make it easy for the Dial-Up Networking Scripting Tool to find the file, save it to your Accessories folder, and use the .scp extension.

What's next?

Assign a script file to a Dial-Up Networking connection

Scripting commands


To assign a script file to a Dial-Up Networking connection

1	Click the Start button, point to Accessories, and then click Dial-Up Scripting Tool.

2	Click the connection you want to assign the script file to.

If you haven't yet created a connection, double-click the My Computer icon, and then double-click Dial-Up Networking. For more information, click Related Topics.

3	In the File Name box, type the location and filename of the script file, or click Browse to find the file.

4	Make any other changes as needed, and then click Apply.

 Related Topics


Scripting commands

You can use the following commands in a script file as required by the computer you are connecting to. You may want to print this topic for reference.

To print this topic, click Options and then click Print Topic.

Return to creating a script file

proc <name>

Begins the script procedure. All scripts must have a main procedure (proc main). The script begins running at the main procedure and stops at the end of the main procedure.

endproc

Ends the script procedure. When this command is reached in the main procedure, Dial-Up Networking will start PPP or SLIP.

delay <n seconds>

Pauses for n seconds before executing the next command. For example, delay 2 will pause for two seconds.

waitfor "<string>"

Waits until the specified characters are sent by the computer you are connecting to before executing the next command. The value you specify for <string> is case-sensitive. For example, waitfor "USERNAME" waits until "USERNAME" (in all capital letters) is received from the computer you are connecting to.

transmit "<string>" | $USERID | $PASSWORD

Sends the specified characters or your username or password to the computer you are connecting to. The username and password variables are automatically set to the username and password for the Dial-Up Networking connection that you assign to the script.

set port databits <integer>

Changes the number of bits in the bytes that are transmitted during the session. You can specify a value between 5 and 8 bits. If this command is not used, then the settings specified in the Properties for the Dial-Up Networking connection that you assign to the script will be used.

set port stopbits <integer>

Changes the number of stop bits for the port during the session. You can specify either 1 or 2. If this command is not used, the settings in the Properties for the Dial-Up Networking connection that you assign to the script are used.

set port parity none | odd | even | mark | space

Changes the parity scheme for the port during the session. If this command is not used, the settings in the Properties for the Dial-Up Networking connection that you assign to the script are used.

set ipaddr

Sets the IP address for the session.

set screen keyboard on | off

Enables or disables keyboard input to the terminal window.

getip <optional index>

Reads an IP address and uses it as the workstation address. <optional index> specifies which IP address to use as the workstation address if the remote computer sends more than one IP addres. For example, set ipaddr getip 2 uses the second ip address sent by the remote computer.

halt

Causes Dial-Up Networking to stop running the script. The terminal window will stay on your screen so that you can enter information manually. To establish the connection, you must click Continue.

;

Indicates a comment. All text preceded by a semicolon is ignored. For example, ;this is a comment.

strings

You can use any character as part of a string, including the following:

^char  If char is a value between @ and _, then the character sequence is translated to a single-byte value between 0 and 31. For example, ^M is converted to a carriage return. If char is a value between a and z, then the character seqence is translated to a single-byte value between 1 and 26. If char is any other value, then the character sequence is not treated specially.

<cr>  Sends or receives a carriage return.

<lf>  Sends or receives a line feed.

\"  Includes a double quote as part of the string.

\^  Includes a caret as part of the string.

\<  Includes a < as part of the string.

\\  Includes a back-slash as part of the string.

For example, transmit "Joe^M" sends Joe, followed by a carriage return, to the remote computer; waitfor "Joe<cr><lf>" waits to receive Joe, followed by a carriage return and a linefeed, from the remote computer before executing the next command in the script.


A script file contains scripting commands that provide and retrieve information to and from the remote computer you are connecting to. This information includes your user name and password, port information, carriage returns, line feeds, and pauses.


An Internet service provider maintains a server that is directly connected to the Internet. You must connect through a service provider or The Microsoft Network unless your organization is directly connected to the Internet.


Lists the Dial-Up Networking connections that you have created. Select the connection you want to assign a script to.


Click this to view the properties for the selected connection. You can make any changes you want to the properties.


Provides a space to type the location and filename of the script you want to assign to the selected connection. If you don't know the location or filename of the script, click Browse.


Click this to find the script file you want on your computer.


Click this to edit the specified script file using Notepad.


Allows you to run the script one command at a time while establishing the connection. This is useful if you want to check your script for errors.


Minimizes the terminal window that displays information as it is sent and received to and from the remote computer. If you want to view the information as the script is running, make sure this box is unchecked.


Click this to display a Help topic that describes the commands you can use to create a script file.


Displays the script file assigned to the current connection. To run the script one command at a time, click Step.


Click this to execute the script, one command at a time. Use this to check your script for errors.


Displays information that is being sent and received to and from the remote computer.

If the Allow Keyboard Input box is checked, you can send information to the remote computer by typing it here.


Allows you to send information to the remote computer directly by typing it in the terminal window. This is useful if you need to halt your script and provide information to the remote computer manually.


Click this to continue establishing the connection.