I need to detect if the app is running on Win32/64.
Update: People are reporting that relying on the [HKLM\\HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0] key is n
The code that you present in the question has a few wrinkles, but it does work correctly. I suspect that you are not actually running that code, and have made an error and somehow posted the wrong code.
FWIW, you should use TOSVersion from System.SysUtils
to check the bitness of the underlying platform. The TOSVersion.Architecture property will tell you whether or not the underlying platform is 32 or 64 bit.