Using ENVIRON$ to Detect Whether Running Under Windows (82002)
The information in this article applies to:
- Microsoft QuickBASIC 4.0
- Microsoft QuickBASIC 4.0b
- Microsoft QuickBASIC 4.5
- Microsoft Basic Professional Development System for MS-DOS 7.0
- Microsoft Basic Professional Development System for MS-DOS 7.1
- Microsoft Cinemania for Windows 1993 edition
- Microsoft Windows 3.0
- Microsoft Windows 3.1
- Microsoft GW-Basic Interpreter 3.20
- Microsoft GW-Basic Interpreter 3.20 and later
- Microsoft GW-Basic Interpreter 3.22
- Microsoft GW-Basic Interpreter 3.23
This article was previously published under Q82002 SUMMARY
A Microsoft Basic program can detect whether it is running under
Microsoft Windows by checking for the existence of the environment
variable "windir" with the function ENVIRON$.
This information applies to Microsoft QuickBasic versions 4.0, 4.0b,
and 4.5 for MS-DOS; Microsoft Basic Professional Development System
(PDS) versions 7.0 and 7.1 for MS-DOS; Microsoft Basic Compiler
versions 6.0 and 6.0b for MS-DOS; Microsoft GW-Basic Interpreter
versions 3.2, 3.22, and 3.23 for MS-DOS; and Microsoft Windows
versions 3.0 and 3.1.
Modification Type: | Minor | Last Reviewed: | 8/16/2005 |
---|
Keywords: | KB82002 |
---|
|