Board index » delphi » Detecting the OS with Delphi 1

Detecting the OS with Delphi 1

Hi,
 What I want to do is detecting on which OS it runs, in order to run
another 16 or 32bit program as a part of an install program...

Right now, what I have done is a 16-bit prog which calls GetVersion
under Delphi 1 (so win16)...

It works OK for win3.11 and Win95/98 but NT 4 appears as a win3.11 OS.

Does anyone know a good way to find out in a win16 prog on which OS it runs ?

Thanks,

--jm

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

 

Re:Detecting the OS with Delphi 1


Well, of course, just after the post,
I check again dejanews and found the answer:

--
You can detect NT in Delphi 1 with:

  Const WF_WINNT = $4000;

  IsNT := (GetWinFlags and WF_WINNT) <> 0;

--
Sorry :)

--jm

In article <71k8nc$ca...@nnrp1.dejanews.com>, I asked

Quote
> Right now, what I have done is a 16-bit prog which calls GetVersion
> under Delphi 1 (so win16)...
> It works OK for win3.11 and Win95/98 but NT 4 appears as a win3.11 OS.

> [how do I detect NT ?]

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

Other Threads