
   Windows95.com Dial-up Scripting Page
   
                                      
               StartConnectivity32-bit SharewareSearchE-mail
                                      
   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 Windows95.com 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 also created a page
   with example scripts that work with real-world connections. Click here
   to jump directly to the example scripts page now.
   
Note about the Microsoft Scripting Tool

   [INLINE]
   
   Many scripting users have been having trouble getting some of the
   Microsoft scripting commands to work. This is because there are two
   versions of the scripting tool available. The basic scripting tool
   (which ships on the Windows 95 CD-ROM and is available for download on
   this page) supports simple scripts only, like the sample script
   provided in this tutorial. The default scripting tool should be
   sufficient for the majority of script users.
   
   Using the more advanced scripting commands requires the scripting tool
   available in Microsoft PLUS!, which is available at your local
   software retailer. Any script that uses the integer command requires
   the Microsoft PLUS! version of the scripting tool.
   
     _________________________________________________________________
                                      
Step 1: Create a Dial-up Connection

   [INLINE]
   
   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 Windows95.com TCP/IP Setup Page to help you set one
   up. Once you have a working connection, proceed to step 2.
   
     _________________________________________________________________
                                      
Step 2: Create a Login Script

   [INLINE]
   
   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 $USERID 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, click here for
   an online version of the scripting language text file included with
   the Dial-up Scripting files from Microsoft. If you use the integer
   command in your script, you will need the version of the Dial-up
   Scripting Tool available in Microsoft PLUS!.
   
   If your provider requires PPP callback, try inserting these lines into
   your script:
   
delay 1
transmit "++++"
delay 1
transmit "at&c0q0o^M"

   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

   [INLINE]
   
   Press the Start 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 Start
   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 the
   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

   [INLINE]
   
   Press the Start 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

   [INLINE]
   
   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.
   
     _________________________________________________________________
                                      
Example Scripts

   [INLINE]
   
   I have put together a collection of sample scripts that work with
   Internet Service Providers around the world. You can find them in my
   Sample Scripts page. All of them are easily modifiable to work with
   your particular provider.
   
     _________________________________________________________________
                                      
   1995 Steve Jenkins
   Microsoft, MS, Windows, Windows 95, and the Windows logo are either
   registered trademarks or trademarks of Microsoft Corporation.
   Microsoft Corporation in no way endorses or is affiliated with
   Windows95.com. All other trademarks are the sole property of their
   respective owners.
