KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q65662: WINDIR Environment Variable Set When Running Windows

Article: Q65662
Product(s): Microsoft Windows 95.x Retail Product
Version(s): WINDOWS:3.0,3.0a,3.1,3.11
Operating System(s): 
Keyword(s): 
Last Modified: 05-OCT-1999

-------------------------------------------------------------------------------
The information in this article applies to:

- Microsoft Windows versions 3.0, 3.0a, 3.1, 3.11 
-------------------------------------------------------------------------------

Microsoft Windows version 3.0 sets the WINDIR environment variable whenever
any program, including a MS-DOS program, is run under it. WINDIR is set to
the directory where WIN.COM is found. This is usually C:\WINDOWS. The
WINDIR variable is removed from the MS-DOS environment when you exit
Windows.

As a result, MS-DOS applications can detect whether they are running under
Windows. If WINDIR is set to a valid name, the application is running under
Windows.

Additional query words: 3.00 3.0 3.0a 3.00a 3.1 3.10 3.11

======================================================================
Keywords          :  
Technology        : kbWin3xSearch kbZNotKeyword3 kbWin300 kbWin300a kbWin310 kbWin311
Version           : WINDOWS:3.0,3.0a,3.1,3.11

=============================================================================

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.