home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD-ROM Aktiv 1
/
CDA1_96.ISO
/
novell
/
taskmstr.exe
/
TEST_02.TSK
< prev
next >
Wrap
Text File
|
1995-10-18
|
4KB
|
130 lines
///////////////////////////////////////////////////////////////////////
// Examples of how to utilize the following supported <TEST>
// parameters:
//
// CURRENT_SCREEN ERRORLEVEL
// EXIST FILE_IN_USE
// LOADED LOGGED_IN
// MOUNTED SCAN_SCREEN
// SCAN_STRING
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
// Check the current screen name CURRENT_SCREEN
// Check to see if an NLM is loaded LOADED
IF NOT CURRENT_SCREEN "Monitor Screen"
IF NOT LOADED MONITOR.NLM THEN LOAD MONITOR
CHANGE_SCREEN "Monitor Screen"
ENDIF
///////////////////////////////////////////////////////////////////////
// Check the error level of a console command ERRORLEVEL
// load monitor.nlm
LOAD MONITOR -P
// Check for success in loading MONITOR
IF ERRORLEVEL THEN ABORT
///////////////////////////////////////////////////////////////////////
// Check for the existance of a file EXIST
// change the working directory to SYS:SYSTEM\TASKMSTR
CWD SYS:SYSTEM\TASKMSTR
IF NOT EXIST TASKMSTR.EXE THEN ECHO "TASKMSTR.EXE" could not be found!
///////////////////////////////////////////////////////////////////////
// Check to see if a file is in use FILE_IN_USE
IF FILE_IN_USE TASKMSTR.EXE
ECHO "TASKMSTR.EXE" is in use!
ELSE
ECHO "TASKMSTR.EXE" is not in use!
ENDIF
///////////////////////////////////////////////////////////////////////
// Check to see if an NLM is loaded LOADED
IF LOADED "MONITOR.NLM"
ECHO "MONITOR.NLM" is loaded!
ELSE
ECHO "MONITOR.NLM" is not loaded!
ENDIF
///////////////////////////////////////////////////////////////////////
// Check to see if a user is logged in LOGGED_IN
IF LOGGED_IN "SUPERVISOR"
ECHO "SUPERVISOR" is logged in!
ELSE
ECHO "SUPERVISOR" is not logged in!
ENDIF
///////////////////////////////////////////////////////////////////////
// Check to see if a volume is mounted MOUNTED
IF MOUNTED BACKUP
ECHO "BACKUP" is mounted!
ELSE
ECHO "BACKUP" is not mounted!
ENDIF
///////////////////////////////////////////////////////////////////////
// Scan an NLM screen for a specific string SCAN_SCREEN
// unload the backup NLM if it is loaded
IF LOADED BACKUP.NLM THEN UNLOAD BACKUP
// load our backup NLM
LOAD BACKUP.NLM
// if the NLM did not load abort the task file
IF ERRORLEVEL THEN ABORT
// change to the backup NLM screen
IF NOT CURRENT_SCREEN "Backup Screen" THEN CHANGE_SCREEN "Backup Screen"
// execute the backup of one file by keying in the following:
KEYIN "Backup" ENTER
KEYIN "File" ENTER
KEYIN "TASKMSTR.EXE" ENTER
KEYIN "Y" ENTER
// now let's wait about 2 minutes (120 seconds)
WAIT 120
// let's see if the backup completed by scanning the NLM screen for
// the "Backup completed successfully" string. BACKUP.NLM displays
// this message when a backup has been completed.
IF SCAN_SCREEN "Backup completed successfully"
ECHO The backup is complete!
ELSE
ECHO There was an error in running the backup!
ENDIF
// unload the backup NLM
UNLOAD BACKUP
///////////////////////////////////////////////////////////////////////
// Check to see if a volume name is part of SCAN_STRING
// the Current Working Directory
IF SCAN_STRING "%VOL_NAME%" "%CWD%"
ECHO %VOL_NAME% was found in %CWD%
ELSE
ECHO %VOL_NAME% was not found in %CWD%
ENDIF