MS-DOS-Based Application Checks for Existence of Windows

Last reviewed: August 30, 1996
Article ID: Q128399
The information in this article applies to:
  • Microsoft Windows 95

SYMPTOMS

When you run an MS-DOS-based application in Windows 95, the application may try to exit Windows 95 or you may receive an error message similar to the following message:

   This program does not run under Windows.

CAUSE

Some MS-DOS-based applications are designed to check for the existence of Windows and fail if Windows is found to be running.

WORKAROUND

Windows 95 has an option for this type of MS-DOS-based application. Follow these steps to use the "Prevent MS-DOS-based programs from detecting Windows" option:

  1. Use the right mouse button to click the icon for the MS-DOS-based program, then click Properties on the menu that appears.

  2. Click the Program tab, then click the Advanced button.

  3. Click the "Prevent MS-DOS-based programs from detecting Windows" check box, then click the OK button twice.

MORE INFORMATION

When you choose the "Prevent MS-DOS-based programs from detecting Windows" option, Windows 95 does the following:

  • Removes WINDIR as an environment variable for that application.
  • Returns a message stating that Windows is not running if the MS-DOS- based application checks to see if Windows is running or what mode Windows is running in.

NOTE: If you use this option you cannot run Windows-based applications from this command prompt.


KBCategory: kbui kb3rdparty kberrmsg
KBSubcategory: wpp95 win95 appscomp
Additional reference words: 95 stealth virtual machine vm


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.

Last reviewed: August 30, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.