The LEcho utility displays and writes messages to log files and sets the system error level.
ServerGuide Scripting Toolkit provides 32- and 64-bit versions of LEcho.
set LECHO_LOG=C:\SGTKWinPE\Lecholog.txtLEcho checks the number of characters on the command line against the current command line limits of 8000 characters for the Windows environment. A message is displayed if the characters exceed the limit.
LEcho [message] [/F] [/R:n] [/E:n] [/P] [/P:n] [/T:n] [/SC] [/SN] [/N] [/LO] [/DO] [/?]
Parameter | Description |
---|---|
message | The message to display to the screen or log file. |
/F | Formats the message using the following variables:
|
/R:n | Repeats the message n times. |
/E:n | Displays the error message and sets the system error level to n. |
/P | Pauses until a key is pressed. |
/P:n | Pauses for n seconds or until a key is pressed |
/T:n | Initiates a timer for n seconds. This timer cannot be ended prematurely. |
/SC | Suppresses the output of the countdown timer. |
/SN | Suppresses the newline character. |
/N | Creates a new, blank log file. If the log file already exists, it is overwritten. |
/LO | Writes the message to the log file only. |
/DO | Writes the message only to the display. |
/? | Displays a help message containing the application syntax. |
Example | Description |
---|---|
LEcho | Sends a blank line to the display and the log file if LECHO_LOG is set. |
LEcho My Message | Sends the text My Message to the display and to the log file if LECHO_LOG is set. |
LEcho /T | Displays a message indicating the current system time to the display and to the log file if LECHO_LOG is set. |
LEcho My Message /T | Sends the text 13:55:24 My Message to the display and the log file if LECHO_LOG is set. 13:55:24 indicates the current system time. |
LEcho My Message /T /DO | Sends the text 13:55:24 My Message to the display only. 13:55:24 indicates the current system time. |
LEcho My Message /E:200 | Sends the text My Message to the display and the log file if LECHO_LOG is set and then sets the system error level to 200. |
LEcho /E:155 | Sets the system error level to 155. No text is displayed or logged. |
LEcho New Log File /N /LO |
|
LEcho %d\t%t My Message /F | Sends the text Sun 12-31-2006 16:12:13 My Message to the screen and log file if LECHO_LOG is set. |
LEcho Pausing for 30 seconds. /P:30 | Sends the text Pausing for 30 seconds and starts a countdown timer at 30. You can bypass the countdown by pressing any key. |
LEcho Running a 30 second timer. /T:30 /SC /SO | Sends the text Running a 30 second timer. to the screen only and returns control to the environment after 30 seconds. No timer is displayed. |