[DUG] Help Detecting Windows Version

John Bird johnkbird at paradise.net.nz
Mon Dec 13 14:44:51 NZDT 2010


?That environment variable was mentioned as a way for eg Windows XP 64 bit, 
as from what someone said like the iswow call might not apply for XP 64bit?

John

> ProgramFiles(x86) environment variable which is only set
> on 64 bit versions

Only set **automatically by the OS**- there's presumably nothing stopping
someone from setting such an environment variable for their own purposes
should they choose so to do.

Why would they?  Who knows.  But they *could*.  Perhaps if they wanted to
fool an app that used a crude 64-bitness detection algorithm into doing
something it otherwise wouldn't...  ;)


-----Original Message-----
From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz] On
Behalf Of John Bird
Sent: Monday, 13 December 2010 13:47
To: NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] Help Detecting Windows Version

?http://stackoverflow.com/questions/601089/detect-whether-current-windows-ve
rsion-is-32-bit-or-64-bit

easiest way depends on whether Windows 7 or Server 2008, or older.
Simplest and most general over windows versions looks to be
There are more specific ways added for Windows 7/Vista/Server 2008.

John

Hi, has anyone got a function they can share that will detect all
current versions of Windows out there?
F.i. My old routine cant detect Windows Server 2008 64 bit
Tried googling but can only find outdated code like mine.




_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi at delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject:
unsubscribe

_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi at delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject: 
unsubscribe 




More information about the Delphi mailing list