WINHQ Dial-up Scripting Page Last updated September 1, 1995 In order to automate the repetitive manual steps that must be completed to log into many ISPs around the world, more and more users are looking to scripts as a way to facilitate their login process. This section of the WINHQ discusses how to create scripts and how to use the Windows 95 built-in scripting tool to attach a script to a Windows 95 dial-up session. In addition, I have posted example scripts that work with real-world connections. If you have a script that works for a specific ISP, college, or online service, please email it to me in text form (in the body of the email) so that others may use it as well. Click here to jump directly to the example scripts now. --------------------------------------------------------------------------- Step 1: Create a Dial-up Connection Before writing your script, make sure that you have a working dial-up connection to your Internet provider. If you do not, use the information on the WINHQ TCP/IP Internet Connection Page to help you set one up. Once you have a working connection, proceed to step 2. --------------------------------------------------------------------------- Step 2: Create a Login Script Using a text editor (Notepad will work fine), create a script that will issue the commands necessary to log you into your Internet provider. If you have a PPP connection, many providers do not require manual log in steps - your username and password in the Connect To dialog box will be sufficient, and you won't need dial-up scripting at all. However, all SLIP/CSLIP connections, some PPP connections, and any other connection that requires menu selections, advanced input, or that does not strip information from the initial dialog box will require a script. If you have a PPP connection that you think requires a script, try putting ppp:your_username in the username text area in the Connect To dialog box. Some providers will accept this to initiate a PPP connection. If that doesn't work, try a script. In most cases, you will most probably be able to modify an existing script to connect successfully with your provider. Sample scripts are available here. All scripts must begin with the following line: proc main and end with: endproc These are the commands to tell Windows 95 to start and stop the script. Use the waitfor and transmit commands to wait for certain information from your provider (such as a login: prompt or a password: prompt) and to transmit your username, password, and any other necessary information. The variables $USERNAME and $PASSWORD will send the username and password entered in the Connect To dialog box at the beginning of the dial-up session. To send a carriage return to you provider, use a ^M. To wait for any amount of time, use delay followed by the number of seconds. You can put comment lines in your scripts by beginning the line with a semicolon (;). For example: a simple script that starts, waits for a login: prompt, sends your username, hits ENTER, waits for a password prompt, sends your password, hits ENTER then ends, would look like this: ;This will begin the script proc main ;Enable the following to delay for 3 seconds first to ;allow host time to send initial characters (not needed by many ISPs). delay 3 ;Sometimes, ISP's need a carriage return to initiate the login process. ;If your ISP requires this, uncomment the following line: ;transmit "^M" ;Wait for the login prompt before entering the user ID and carriage return ;(I left off the first letter since login is case-sensitive) ;The $USERID variable is taken from the dial-up connection dialog box waitfor "ogin:" transmit $USERID transmit "^M" ;Enter your password (I left off the first letter since login is case-sensitive) ;and send a carriage return waitfor "assword:" transmit $PASSWORD transmit "^M" ;Finish the script! endproc In fact, the above is the exact script I use to connect to my provider! If your login requires more advanced input, download SCRIPT.TXT to learn more. Once you're finished with your script, save it in the \Program Files\Accessories\ folder, with a file extension of scp (i.e. ppp.scp). --------------------------------------------------------------------------- Step 3: Verify that the Dial-up Scripting Tool is Installed Press the button, select Programs, then Accessories. If the Dial-Up Scripting Tool shows up, you're ready to proceed to step 4. If it is not there, and you have the Windows 95 CD, press the button, select Settings..., then Control Panel. Double-click the Add/Remove Programs icon. Select the Windows Setup tab, then click on the Have Disk.. option. Assuming your CD-ROM drive is E:, enter the path of e:\Admin\Apptools\Dscript. Press OK and the SLIP/CSLIP drivers and Dial-up Scripting Tool will be installed. If you have Windows 95 on floppies, you can click here to download Dial-up Scripting Tool and SLIP drivers directly from Microsoft (be aware, however, that their server is VERY busy). Then install the Dial-up Scripting Tool as shown in the above paragraph. --------------------------------------------------------------------------- Step 4: Attach Your Script to a Dial-up Profile Press the button, select Programs, Accessories, then Dial-Up Scripting Tool. You'll see the utility's dialog box, which looks like this. Your current dial-up profile(s) will be listed in the text area on the left (as shown in the picture). Select the profile for which you wrote the script, and then press the Browse button. If you saved your script in the Accessories folder, it should appear in the dialog box. Select it and press Open. If you'd like to troubleshoot your script (recommended for the first time through), select the Step through script option. Upon connection, this will allow you to "step through" each line of your script and see the result in a terminal screen. When your script is working properly, select the Start terminal screen minimized option to keep the script window minimized when you connect. Press the Apply button (it's best to keep the Dial-up Scripting Tool dialog box open until you finish troubleshooting your script) and get ready to try your script! When you are certain it works, you can press OK to close the Dial-up Scripting Tool. It does not have to be open when you connect for the script to work. --------------------------------------------------------------------------- Step 5: Connect and Troubleshoot your Script IMPORTANT! Before you connect and use your script, go to My Computer, double-click Dial-up Networking, select your dial-up profile, click the right mouse button, and select Properties. Underneath your modem (in the Connect using section), press the Configure button. Select the Options tab and make sure that in the Connection Control area, NEITHER OPTION IS SELECTED. Even though you probably had the Bring up terminal window after dialing option selected previously, the Dial-up Scripting Tool opens a terminal window anyway. Leaving this option checked will cause your script to fail. Using Dial-up Networking, connect to your Internet service provider. Make sure your username and password are entered into the dialog box, since your script will need these variables to connect. If you chose to step through the script, a terminal window will appear upon connect and let you step through your script by pressing F7. Watch the result closely to track down errors in your script. You can press F3 during this process to cancel at any time. Once your script connects reliably, turn off the Step through script option in the Dial-up Scripting Tool dialog box. You can also close the Dial-up Scripting Tool. It does not need to be open for the script to run. It will run automatically with your dial-up connection as long as it is attached properly. If you feel that others could benefit from your script, please send it to me in text form, in the body of an email message (no attached files, please). I will post it on this page for others to use! --------------------------------------------------------------------------- Example Dial-up Scripts The following are example dial-up scripts for use with the Windows 95 Dial-up Scripting Tool. Any of them could be easily modified to work with your specific host. Some were created by me, some were included with the Dial-Up Scripting Tool, and some were sent in by brave scripting pioneers around the world. I cannot support them, nor can I be responsible for their results. You are free to use them at your own risk. SCRIPT NAME CREATED BY DESCRIPTION Establishes a regular PPP connection with a UNIX host. Works for static or dynamic IP PPP.SCP Steve Jenkins addressing. Made specifically for connection to MidWest Communications, Inc. and Utah Wired. PPPMENU.SCP Microsoft Establishes a PPP connection with a host that uses a menu system. Establishes a regular SLIP connection with SLIP.SCP Microsoft a UNIX host. Designed for use with a static IP address. SLIPMENU.SCP Microsoft Establishes a SLIP connection with a host that uses a menu system. Establishes a PPP connection with CIS.SCP Microsoft Compuserve, which requires changing the port settings to log in. Establishes a regular PPP connection with a UNIX host. Works for static or dynamic IP BYUPPP.SCP Steve Jenkins addressing. Made specifically for connection to Brigham Young University's CougarNet account. Establishes a PPP connection with a host PIPEX.SCP Richard Gate that requires sending the protocol type after the username and password. Made specifically for connection to PIPEX (UK). Establishes a PPP connection with a host that requires sending the protocol type NSTN.SCP Alex Burke after the username and password. Made specifically for connection to NSTN (Canada). Establishes a SLIP connection with a host that requires sending the protocol type UMINN.SCP Richard after the username and password. Designed Wattenbarger for use with a static IP address. Made specifically for connection to the University of Minnesota. Establishes a PPP connection with a host that requires sending the protocol type UMD.SCP Ghost after the username and password. Made specifically for connection to the University of Maryland, College Park. Establishes a SLIP connection with a host that requires sending the protocol type after the username and password. Made UTAH.SCP Len Bowes specifically for connection to the University of Utah (even though BYU will kill them at this year's football game....). Establishes a PPP connection with a host INFINET.SCP Michael Cooper that requires sending the protocol type after the username and password. Made specifically for connection to Infi-Net. Establishes a PPP connection with a host that requires sending the protocol type INTELENT.SCP Bob De Long after the username and password. Made specifically for connection to Intelenet, Salt Lake City, Utah. Establishes a PPP connection with a host that requires sending the protocol type DEC.SCP Terry Lemons after the username and password. Made specifically for connection to a Digital Equipment Corporation DECserver. --------------------------------------------------------------------------- Send fan mail or small, unmarked bills to: stevej@mwci.net Go to Top of Page Back to WINHQ ©1995 Steve Jenkins of WebSavvy Microsoft, MS, MS-DOS, Windows, Windows NT, Windows 95, and the Windows logo are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Microsoft Corporation in no way endorses or is affiliated with The Windows 95 InterNetworking Headquarters