Free 14-Day Evaluations    
Product Downloads    

Sign in     


DESKTOP MOBILE DOWNLOAD PURCHASE SUPPORT INFO COMPANY
 Home  >>  Support  >>  Knowledge Base

Sending a Command as Part of Automatic Login

TERM and TinyTERM for Windows have an automated login function that can readily be extended to execute system commands as part of the connection. Under the Login setup, or the Advanced Login setup, there are four “Wait for” and “Then send” options. The first two lines are taken for the login and password prompts. The last two can be used for anything.

Note that the “Wait for” items are case-sensitive. That’s why the first letters are missing from the words “login” and “password” there. Some systems send these in upper case, others in lower. But the rest of the word is virtually always lower case, so leaving the first letter off bypasses guessing its case.

The default “Then send” strings are composed of what look like control characters. Here they are, explained:

  • ^W – This causes TinyTERM to wait one second before performing the next operation.
  • ^U – This sends the username from the Login dialog down the comm line.
  • ^P – This sends the password. The password is stored encrypted, so it can’t be read directly from the configuration file.
  • ^M – This sends a carriage return, ASCII value 13.

Any other characters entered in a “Then send” line will be sent as plain text. All characters in a “Wait for” line will be read as plain text.

Given that information, you can send any command to the host using those text boxes. For example, to wait for a $ prompt, then send an “ls” command, you would enter:

$

in the third “Wait for” line. In the accompanying “Then send” line, enter:

ls^M

The one-second wait given by ^W may or may not be necessary. Experiment with the timing to see how the commands work out. We also recommend you go through the login manually before automating it, so that you can note any differences from the defaults. Different or additional prompts are the most common changes.

Comments are closed.

  Copyright © 2024 Century Software, Inc. All Rights Reserved999 TERMS OF USE PRIVACY POLICY EULA