Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Detecting JP Software shells

nchernoff

Administrator
May
42
2
Staff member
Migrated From JP Software Wiki

A batch file can test whether it is running in a JP Software shell by attempting a numeric comparison:

Code:
if 01 == 1.0 echo Running in 4DOS, 4NT or Take Command!

This syntax is legal in COMMAND.COM and all compatible shells, including 4DOS, 4NT, Take Command, and CMD.EXE. In JP Software shells, this is a numeric comparison and true; in COMMAND.COM and CMD.EXE, it is a string comparison and false.

Once you have established that the batch file is running in a JP Software shell, internal variables like _CMDPROC, _4VER, _DOS, _DOSVER, _WIN, and _WINVER may be used to further determine the operating environment.
 
Back
Top