🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms
Article #11869

Am I running Windows?

#11869
From: Joe Morris
Date: Tue, 14 May 1991 19:29
22 lines
1633 bytes
There's probably a proper RTFM response for this question somewhere, but...

If a DOS app is running, how can it *reliably* tell if it is in a DOS
window (vs. running from the command line)?  The test has to be valid 
without relying on Windows startup setting environment variables, etc,
and should be usable on any OEM DOS 3.0 or better.  And it should be
a documented interface if possible.

I'm not interested in distinguishing full-screen from windowed displays;
the only question is whether Windows is present in memory.

The situation is that we've got a quite simple TSR (EBIOS.COM; it's part
of YTERM) which blows the system out of the water if the user tries to
remove it from within a DOS window.  Procedures which rely on the 
Windows startup batch file to set flags have proven too easy to
(accidentally) circumvent by some users, so I would like to hardwire in
a test to prevent this.  Suggestions?

Of course, it would be even better if someone at Microsoft would explain
the relationship between a TSR and Windows.  Grumble grumble grumble...

Joe Morris
Technical Details
Message-ID: <jcmorris.674249378@mwunix.mitre.org>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!elroy.jpl.nasa.gov!sdd.hp.com!spool.mu.edu!snorkelwacker.mit.edu!linus!linus!mwunix.mitre.org!jcmorris

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!elroy.jpl.nasa.gov!sdd.hp.com!spool.mu.edu!snorkelwacker.mit.edu!linus!linus!mwunix.mitre.org!jcmorris
From: jcmorris@mwunix.mitre.org (Joe Morris)
Newsgroups: comp.windows.ms
Subject: Am I running Windows?
Keywords: DOS-windows
Message-ID: <jcmorris.674249378@mwunix.mitre.org>
Date: 14 May 91 19:29:38 GMT
Sender: news@linus.mitre.org (News Service)
Organization: The MITRE Corporation, Bedford MA
Lines: 22
Nntp-Posting-Host: mwunix.mitre.org