Getting through two-second gaps and large blocks of text in Switch.inf

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

Getting through two-second gaps and large blocks of text in Switch.inf

If the computer you are connecting to has a two-second gap in the data stream response to your computer, the remote access server assumes that the gap is the end of the response. These gaps can occur anywhere, even between words, and are detected by using modem diagnostics. For more information, see Log and view modem commands.

If you write a script that fails for no apparent reason, you can use modem diagnostics, and then consult systemroot\ModemLog_model.txt to see if a response ends in the middle of a word. Model is the name of the modem as it appears in the list of installed modems in Modem Properties. If a response ends in the middle of a word, your script must account for the two-second gap. A simple way to do this is to include the following command:

COMMAND=<cr>

You can skip to the end of large blocks of text that contain multiple gaps by using the LOOP= keyword and by matching text at the end of a block. For example:

COMMAND=<cr>
OK=<match>"Enter the service to start:"
LOOP=<ignore>

In this example, the network connection sends a null command (waits two seconds). The network connection then waits for the "Enter the service to start:" message. If this is a long block of text, the connection does not find the string. The connection then moves to the LOOP command. The LOOP command causes Network Connections to return to the line above, and the connection waits for the words "Enter the service to start:" in the second response. In this manner, you can loop though long blocks of text until you reach the text of the desired prompt.

For information about activating a Switch.inf script, see Activate a logon script. For more information about Switch.inf scripts, see Automating the Dial-up Logon Process by Using Switch.inf Scripts.