home *** CD-ROM | disk | FTP | other *** search
- OPSYS
- -----
-
- This little utility informs you about the running operating system. It is use-
- full to detect, if you're running DOS in a OS/2 environment or MS-DOS itself.
- I wrote this utility to handle the environment-settings in a common batch-file.
-
-
- HOW TO RUN OPSYS:
- -----------------
-
- Just enter OPSYS (it runs under DOS as under OS/2) without any parameter. You
- will see the information about the environment:
-
- OPSYS Version 1.0
-
- OS-Version: 20.10, Real mode
- Assuming running DOS under OS/2
- Exit: 1
-
- This output has been generated in a MDOS-Box. The value of 'Exit' means the
- errorlevel.
-
-
- ERRORLEVELS:
- ------------
- (The most important part of this utility...)
-
- OS/2 Protected mode: 2
- OS/2 MDOS-Session: 1
- MS-DOS: 0
-
-
- SAMPLE BATCH- / CMD- FILE:
- --------------------------
-
- @echo off
- opsys
- if errorlevel == 2 GOTO OS2
- if errorlevel == 1 GOTO MDOS
- if errorlevel == 0 GOTO MSDOS
-
- :continue
- goto end
-
- :MSDOS
- echo MS-DOS
- goto continue
-
- :MDOS
- echo MDOS
- goto continue
-
- :OS2
- echo OS/2 Protected
- goto continue
-
- :END
-
-
- CREDITS:
- --------
-
- If you want to get in touch with me (feedback is always welcome...), you can
- reach me at:
-
-
- Markus Fehr, Haldenstrasse 9, CH-8302 Kloten
-
- Internet: markus.fehr@mcmeier.active.ch OR
- 100034,2525@compuserve.com
- CompuServe: 100034,2525
-
-
-
- Have fun! :-))
-