WINRUN
 |
NukeSoft Utilities
|
| Comes with these versions of DOS |
N/A |
| How difficult to use (1 = easy, 4 = hard)? |
1 |
| How safe to use (1 = very safe, 4 = very
dangerous)? |
1 |
| How common (1 =very common, 4 = very obscure)? |
2 |
Description
Displays a message and returns an errorlevel
if MS Windows is running
How to use
WINRUN
If Windows is running, WINRUN returns
an errorlevel of 1.
If Windows is not running, WINRUN
returns an errorlevel of 0.
Comments
WINRUN is designed to be mainly used
for batch file programming. I use it myself to choose between two
different
versions of PKZIP. One version is designed to be run under Windows
95/NT
and another is designed to be run in plain DOS.
WINRUN works by checking for the "windir"
environment variable. When Windows is running the environment variable
is set in lower case. It's impossible to set an environment variable
in lower case at the command prompt; you have to program it.
See Also
ERRORLEVEL
Printed from the NukeSoft MS-DOS Reference. Copyright
© 1995 - 2006 Marcus Houlden