Possible Duplicate:
Detect Windows Server version 32/64-bit in CLI

Is there a way to check whether a user is running a 64-bit or 32-bit operating system by looking in the registry?

The following site makes some suggestions: http://www.maxi-pedia.com/32+Bit+or+64+Bit+Operating+System

But the suggestions of

HKLM\HARDWARE\DESCRIPTION\System\CentralProcessor\0

and

HKLM\SYSTEM\CurrentCongtrolSet\Control\Session Manager\Envirornment

do not appear to exist in my registry

link|improve this question

79% accept rate
In what way do they not work? – Tobias Plutat May 31 '11 at 9:46
Sorry. I've clarified that now. – Urbycoz May 31 '11 at 9:50
Which version of Windows are you on? – Tobias Plutat May 31 '11 at 9:56
I'd like it to be generic across all windows versions. – Urbycoz May 31 '11 at 10:03
2  
from the linked duplicate - HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion - check for BuildLabEx – Sathya May 31 '11 at 10:22
show 4 more comments
feedback

closed as exact duplicate by Gareth, Mehper C. Palavuzlar, Nifle, Gilles, alex Jun 1 '11 at 12:52

This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question. See the FAQ for guidance on how to improve it.

1 Answer

up vote 3 down vote accepted

The registry key

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\BuildLabEx

should give you the required info

link|improve this answer
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.