Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Registry entry differs in windows 7 64 bit

I have installed a software Foxit Reader (PDF reader)

My application checks whether this software has been installed or not by checking the following entry exists or not.

HKEY_LOCAL_MACHINE\SOFTWARE\Foxit Software\Foxit Reader

It seeems to have worked fine in all windows OS except Windows 7 64 bit. On investigating I find that the registry entry for this software is located in a different location. below is the location.

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Foxit Software

How can I check whether Foxit Reader is installed or not correctly and it should work in all versions of Windows OS.

Thanks. Any help much appreciated. :)

like image 643
Bhaskar Avatar asked Oct 09 '22 17:10

Bhaskar


1 Answers

EDIT:

Wow6432Node is where the 32 bit entries live. 64 bit is at HKLM\Software. In .net 4.0, the ability was added to read tehm easily.

See this for example 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 impport advapi32.dll and use RegOpenKeyEx, RegCloseKey, and RegQueryValueEx.

like image 82
bryanmac Avatar answered Oct 12 '22 06:10

bryanmac