Re: Detect if running in Windows environment
- From: Herbert Kleebauer <klee@xxxxxxxxx>
- Date: Wed, 14 Mar 2007 11:20:52 +0100
Sonny wrote:
I have seen past threads about checking if the software is running in
a Windows environment but I think it is not applicable in Win XP.
Using Int 2F/AX=1600h or AX=160Ah or getenv("windir") failed. I mean,
I run the program in Win XP and it did not detect that it is running
in windows (The program ran!). Is there a new way? Thanks.
In Win32 all exe have 16 and 32 bit part. If the program is started
in DOS, then exe is a valid 16 bit exe which, when executed, mostly
just prints "This program requires Windows". If started in Windows,
the 32 bit part is executed. But you can do it also the other way.
Put your program in the 16 bit part of the exe and output in the
32 bit part: "This program requires a real DOS" and exit.
.
- Follow-Ups:
- Re: Detect if running in Windows environment
- From: Sonny
- Re: Detect if running in Windows environment
- From: Olof Lagerkvist
- Re: Detect if running in Windows environment
- References:
- Detect if running in Windows environment
- From: Sonny
- Detect if running in Windows environment
- Prev by Date: Re: Detect if running in Windows environment
- Next by Date: Re: Detect if running in Windows environment
- Previous by thread: Re: Detect if running in Windows environment
- Next by thread: Re: Detect if running in Windows environment
- Index(es):
Relevant Pages
|