Registry entry is different in Windows 7 64 bit

I installed Foxit Reader software (PDF reader)

My application checks if this software is installed or not, checking if the following entry exists.

HKEY_LOCAL_MACHINE \ SOFTWARE \ Foxit Software \ Foxit Reader

It seems to have worked fine on all Windows OS except Windows 7 64 bit. During research, I found that the registry entry for this software is in a different place. below is the location.

HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \ Foxit Software

How to check if Foxit Reader is installed or not, and it should work in all versions of Windows OS.

Thanks. Any help is much appreciated. :)

+4
source share
2 answers

EDIT:

Wow6432Node is the place where 32-bit records live. 64 bit - in HKLM \ Software. In .net 4.0, the ability to easily read text has been added.

See this, for example, the code:

http://www.rhyous.com/2011/01/24/how-read-the-64-bit-registry-from-a-32-bit-application-or-vice-versa/

Without 4.0, you will have to import the advapi32.dll file and use RegOpenKeyEx, RegCloseKey and RegQueryValueEx.

+4
source

I would probably check both locations. You can look in the 32-bit registry location, but then you cannot find the 64-bit version of Foxit (if it will ever be created).

0
source

All Articles