Article ID: 65662 - Last Review: July 7, 2005 - Revision: 2.1

WINDIR Environment Variable Set When Running Windows

This article was previously published under Q65662
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.
Expand all | Collapse all

APPLIES TO
  • Microsoft Windows 3.0 Standard Edition
  • Microsoft Windows 3.0a
  • Microsoft Windows 3.1 Standard Edition
  • Microsoft Windows 3.11 Standard Edition
Keywords: 
KB65662
 

Article Translations