Dec 132017
Check for TSR’s in memory within batch files to load/unload them. | |||
---|---|---|---|
File Name | File Size | Zip Size | Zip Type |
CHKTSR.COM | 961 | 774 | deflated |
CHKTSR.DOC | 7214 | 2580 | deflated |
Download File CKTSR103.ZIP Here
Contents of the CHKTSR.DOC file
CHKTSR 1.03
-----------
Function
--------
CHKTSR tells you whether or not a specific program is currently
resident in memory. An errorlevel is returned for use in batch
files. CHKTSR may be useful in situations where a batch file or
other process requires that certain programs, primarily TSRs, be
resident (or not resident). DOS 3.0 or later is required.
Version 1.03 simply improves CHKTSR's ability to find programs
loaded high under DOS 5.0.
Use
---
To determine whether or not a program is present in memory, use
CHKTSR name [/E]
where "name" is the name of the program you're interested in.
Use only the primary file name--don't include a drive, path, or
extension. If the optional switch /E is present, CHKTSR only
returns an errorlevel; there is no display.
For example, to determine if the program "MYTSR" is loaded:
CHKTSR mytsr
CHKTSR will attempt to determine whether or not MYTSR is
currently loaded. It will then display one of the following:
Program MYTSR not found
Program MYTSR found at segment xxxx
where xxxx is the hexadecimal segment number where the program
was found (its PSP, or Program Segment Prefix address). If
the program was loaded more than once, multiple copies of the
"found" message will appear, one for each loaded copy.
Remember that CHKTSR won't display anything if you use /E:
CHKTSR mytsr /e
Only the errorlevel will be returned.
Errorlevels
-----------
CHKTSR will return one of the following errorlevels:
0 Program not found
1..253 Found this many copies of program
254 Error found in DOS's memory control block chain
255 Usage error or incompatible DOS version (2.x)
Use in batch files
------------------
Here is a skeleton batch file that demonstrates how to use the
returned errorlevel correctly:
chktsr mytsr /e
if errorlevel 255 goto usage
if errorlevel 254 goto oops
if errorlevel 1 goto present
rem
rem MYTSR is not present
...
:PRESENT
rem MYTSR is loaded at least once
...
:OOPS
rem Your memory is hosed up, DOS is going to crash.
rem Not very likely to occur in this context.
...
:USAGE
rem Error in CHKTSR usage, or DOS 2.x
"High DOS" loaders
------------------
If you use one of the "high DOS" program loaders on your 386
system (for example, 386LOAD with Qualitas's 386Max or LOADHI
with Quarterdeck's QEMM), CHKTSR will not work unless the blocks
of memory allocated for the high-loaded program are included in
the DOS memory chain. For example, CHKTSR will not work for
high-loaded programs under 386Max unless you first run
386LOAD OPENHIGH
You can check this by running our free PMAP program. If you
have loaded programs in high memory and they do not show up in
PMAP's display, then CHKTSR won't find them either.
DOS versions
------------
Under DOS 3.0, CHKTSR may not be 100% reliable. It should never
indicate that a program is present when it is not, but there can
be situations where a program that IS present is reported as
"not found." This will generally occur when a TSR has released
its copy of the DOS environment. To be sure that CHKTSR works
with a given program, run it once when you are certain that the
program is present. Chances are that the error will be
consistent--if CHKTSR works once with the program, it will
probably always work.
You can also check with our free PMAP program, using the /D
(Detail) option. If PMAP does not show that the program you're
interested in has an environment block, then CHKTSR won't be
reliable with that program.
CHKTSR should be quite reliable under DOS 4.0 or later, and it
will not run at all under DOS 2.x (which provided no facilities
for this sort of thing).
Revision history
----------------
Version 1.03 12/21/92
Improved compatibility with DOS 5.0.
Version 1.02 08/31/89
Name search is now case-insensitive. DOS always stores
program names in uppercase, but some aftermarket program
loaders apparently do not. Should affect DOS 4.x users
only.
Version 1.01 05/17/89
This version simply implements everything as stated in
this documentation file. We originally released an earlier
development version of the program, mislabeled as 1.00.
Our apologies...
Copyright/License/Warranty
--------------------------
This document and the program CHKTSR.COM are copyrighted by the
author. The copyright owner hereby licenses you to: use the
software; make as many copies of the program and documentation
as you wish; give such copies to anyone; and redistribute the
software and documentation via electronic means. There is no
charge for any of the above.
You may not charge or request donations for redistribution of
any such copies, however made; and you may not distribute the
software and/or documentation with commercial or sharware
products without prior permission in writing from the copyright
holder. An exception is granted to recognized user's groups,
which are authorized to charge a small fee for composite disks
which may contain CHKTSR, as long as the fee is intended to
cover the costs of materials, handling, postage, library
maintenance, etc., and is charged on a per-disk rather than a
per-program basis.
No copy of the software may be distributed or given away without
this document; and this notice must not be removed.
There is no warranty of any kind, and the copyright owner is not
liable for damages of any kind. By using this free software,
you agree to this.
The software and documentation are:
Copyright (C) 1989,1992 by
Christopher J. Dunford
The Cove Software Group
P.O. Box 1072
Columbia, Maryland 21044-0072
(410) 992-9371
CompuServe: 76703,2002
Internet: [email protected]
-----------
Function
--------
CHKTSR tells you whether or not a specific program is currently
resident in memory. An errorlevel is returned for use in batch
files. CHKTSR may be useful in situations where a batch file or
other process requires that certain programs, primarily TSRs, be
resident (or not resident). DOS 3.0 or later is required.
Version 1.03 simply improves CHKTSR's ability to find programs
loaded high under DOS 5.0.
Use
---
To determine whether or not a program is present in memory, use
CHKTSR name [/E]
where "name" is the name of the program you're interested in.
Use only the primary file name--don't include a drive, path, or
extension. If the optional switch /E is present, CHKTSR only
returns an errorlevel; there is no display.
For example, to determine if the program "MYTSR" is loaded:
CHKTSR mytsr
CHKTSR will attempt to determine whether or not MYTSR is
currently loaded. It will then display one of the following:
Program MYTSR not found
Program MYTSR found at segment xxxx
where xxxx is the hexadecimal segment number where the program
was found (its PSP, or Program Segment Prefix address). If
the program was loaded more than once, multiple copies of the
"found" message will appear, one for each loaded copy.
Remember that CHKTSR won't display anything if you use /E:
CHKTSR mytsr /e
Only the errorlevel will be returned.
Errorlevels
-----------
CHKTSR will return one of the following errorlevels:
0 Program not found
1..253 Found this many copies of program
254 Error found in DOS's memory control block chain
255 Usage error or incompatible DOS version (2.x)
Use in batch files
------------------
Here is a skeleton batch file that demonstrates how to use the
returned errorlevel correctly:
chktsr mytsr /e
if errorlevel 255 goto usage
if errorlevel 254 goto oops
if errorlevel 1 goto present
rem
rem MYTSR is not present
...
:PRESENT
rem MYTSR is loaded at least once
...
:OOPS
rem Your memory is hosed up, DOS is going to crash.
rem Not very likely to occur in this context.
...
:USAGE
rem Error in CHKTSR usage, or DOS 2.x
"High DOS" loaders
------------------
If you use one of the "high DOS" program loaders on your 386
system (for example, 386LOAD with Qualitas's 386Max or LOADHI
with Quarterdeck's QEMM), CHKTSR will not work unless the blocks
of memory allocated for the high-loaded program are included in
the DOS memory chain. For example, CHKTSR will not work for
high-loaded programs under 386Max unless you first run
386LOAD OPENHIGH
You can check this by running our free PMAP program. If you
have loaded programs in high memory and they do not show up in
PMAP's display, then CHKTSR won't find them either.
DOS versions
------------
Under DOS 3.0, CHKTSR may not be 100% reliable. It should never
indicate that a program is present when it is not, but there can
be situations where a program that IS present is reported as
"not found." This will generally occur when a TSR has released
its copy of the DOS environment. To be sure that CHKTSR works
with a given program, run it once when you are certain that the
program is present. Chances are that the error will be
consistent--if CHKTSR works once with the program, it will
probably always work.
You can also check with our free PMAP program, using the /D
(Detail) option. If PMAP does not show that the program you're
interested in has an environment block, then CHKTSR won't be
reliable with that program.
CHKTSR should be quite reliable under DOS 4.0 or later, and it
will not run at all under DOS 2.x (which provided no facilities
for this sort of thing).
Revision history
----------------
Version 1.03 12/21/92
Improved compatibility with DOS 5.0.
Version 1.02 08/31/89
Name search is now case-insensitive. DOS always stores
program names in uppercase, but some aftermarket program
loaders apparently do not. Should affect DOS 4.x users
only.
Version 1.01 05/17/89
This version simply implements everything as stated in
this documentation file. We originally released an earlier
development version of the program, mislabeled as 1.00.
Our apologies...
Copyright/License/Warranty
--------------------------
This document and the program CHKTSR.COM are copyrighted by the
author. The copyright owner hereby licenses you to: use the
software; make as many copies of the program and documentation
as you wish; give such copies to anyone; and redistribute the
software and documentation via electronic means. There is no
charge for any of the above.
You may not charge or request donations for redistribution of
any such copies, however made; and you may not distribute the
software and/or documentation with commercial or sharware
products without prior permission in writing from the copyright
holder. An exception is granted to recognized user's groups,
which are authorized to charge a small fee for composite disks
which may contain CHKTSR, as long as the fee is intended to
cover the costs of materials, handling, postage, library
maintenance, etc., and is charged on a per-disk rather than a
per-program basis.
No copy of the software may be distributed or given away without
this document; and this notice must not be removed.
There is no warranty of any kind, and the copyright owner is not
liable for damages of any kind. By using this free software,
you agree to this.
The software and documentation are:
Copyright (C) 1989,1992 by
Christopher J. Dunford
The Cove Software Group
P.O. Box 1072
Columbia, Maryland 21044-0072
(410) 992-9371
CompuServe: 76703,2002
Internet: [email protected]
December 13, 2017
Add comments