home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Freesoft 1997 May
/
Freesoft_1997-05_cd.bin
/
recenz
/
Antiviry
/
VIRUSCAN
/
BOOTSHLD
/
EXTRA.TXT
< prev
next >
Wrap
Text File
|
1996-03-26
|
6KB
|
131 lines
Two Extra Utilities
===================
GETREPLY.EXE
SELFCHEK.EXE
GetReply.Exe Copyright 1995, McAfee Associates, Inc.
------------------------------------------------------
Syntax:
getreply String_to_display ; List_of_key-strokes
GetReply is a utility designed to work in a similar manner as does the
CHOICE.EXE utility that is packaged with modern versions of DOS.
GetReply expects two command-line parameters, separated by a semi-colon (;).
The first parameter is the text to display and the second parameter is a set
of allowable key-strokes. GetReply returns errorlevel 1 if the first key
in the list of allowable key-strokes was pressed; errorlevel 2 if the
second key in the list was pressed; errorlevel 3 for the third key, etc.
If any key NOT in the list of keys is pressed, the user will be rewarded
with a beep from the PC speaker.
Examples:
getreply Press '1' to logon server_1, '2' for server_2 or 'A' to abort ;12a
getreply Would you like to exit this batch file (Y/N) ;yn
In the first example, The user is offered three choices. The only allowable
key-strokes are, '1', '2' and 'A'. If '1' is pressed, errorlevel 1 is
returned. If '2' is pressed, errorlevel 2 is returned. If 'A' or 'a' is
pressed, errorlevel 3 is returned. If the key assignments are reversed then
the returned errorlevels would also be reversed.
In example 2, the user is asked to press 'Y' and 'N'. Any other key-stroke
is rewarded with a beep. Pressing 'Y' or 'y' returns errorlevel 1 and
pressing 'N' or 'n' returns errorlevel 2.
Returned errorlevel 255 means either no command-line parameter was issued or
the semi-colon used to separate the parameters was not used.
Batch File Case Flow:
getreply Run TCPIP (Y/N)? ;yn
echo.
if errorlevel 2 goto SkipTCPIP
echo Now loading TCPIP
goto NextStep
:SkipTCPIP
echo TCPIP Not Loaded!
:NextStep
SelfChek.Exe Copyright 1995-1996, McAfee Associates, Inc.
-----------------------------------------------------------
Syntax:
selfchek Path_name_to_packing_list Text_where_search_begins Text_where_search_ends
SelfChek is used to verify that all files listed within a packing list
are, indeed, present.
SelfChek expects two command-line parameters, separated by empty space. It
can also take a third parameter, preceded by a forward slash character. The
first parameter is the path\name of the file used as a packing list. The
second parameter is used by SelfChek to determine where in the packing list
the search for filenames should begin. This is important because the top
of this could contain verbage, such as, "Files on This Diskette". Naturally
"Files on This Diskette" is not the name of a file and, as consequence, if
searched for, would not be found. The third parameter, which is optional,
can be used to specify where the search for filenames should end. This way
any text following the listing can be ignored.
NOTE: Whatever drive\path holds the packing list is presumed to be the
same drive\path to the files list in the packing list. Therefore, you
MUST supply the complete path\name for your packing list!
The packing list needs to be a standard, ASCII test file where each line in
the list is terminated with a standard carriage return. All text after the
text where search begins must begin with filenames. Each filename must be
setup into two fields: The first field occupies eight character spaces,
followed by a single space then, the second field must occupy three spaces
for the file's extension name. A good method to use to setup the text in
an appropriate manner is to use VALIDATE.EXE to create the list.
Example creating a packing list:
validate c:\program\*.* > c:\packing.lst
Once the list is created, use a text editor to add your verbage at the
beginning of the list.
Example List named packing.lst:
BootShield Packing List
-----------------------
The following is a list of files on this diskette with their respective
Validation codes:
INSTALL BAT 6986 11-30-95 1:16p C826 6133
GETREPLY EXE 2034 11-29-95 8:39p 7536 B82F
BSSETUP EXE 148688 11-21-95 1:54p 4D19 EDAE
BSSHELP HLP 1743 11-21-95 1:54p DE5E 853A
Now, to have SelfChek search for the existance of the four files listed,
and, assuming all files are on A: drive, type:
SelfChek a:\packing.lst Validation codes:
SelfChek will search A: drive for a file named, "packing.lst". If found,
this file is now examined for the text, "Validation codes:". Once this
text is found, all non-blank lines are presumed to contain filenames and
these are then determined to either exist or not. If any of these files
do not exist, SelfChek returns errorlevel 1. If all of these files exist,
SelfChek returns errorlevel 0 (zero).
Returned errorlevel 255 means that there were no parameters used when you
ran SelfChek. Errorlevel 254 means you did not supply the second parameter
and errorlevel 253 means the packing list was not found.
Batch File Case Flow:
SelfChek a:\packing.lst Validation codes:
if errorlevel 1 goto FileMissing
echo All files present and accounted for.
goto NextStep
:FileMissing
echo One or more files are missing!
:NextStep