I'm building an installer to deploy a plug-in for a 3rd party application. This application is a 32-bit app and it writes information about its install path to a couple of registry keys. On x86 platforms, these registry keys are located at:
HKLM\Software\CompanyName\ProductName\AppDataPath
HKLM\Software\CompanyName\ProductName\UserDataPath
On x64, they're found at:
HKLM\Software\Wow6432Node\CompanyName\ProductName\AppDataPath
HKLM\Software\Wow6432Node\CompanyName\ProductName\UserDataPath
My question is, is it possible to create one registry search that will check both the x86 and x64 locations for each key? For example, is it possible to create a search that will look at both of these locations?
HKLM\Software\CompanyName\ProductName\AppDataPath
HKLM\Software\Wow6432Node\CompanyName\ProductName\AppDataPath
I see the checkbox that says "Search the 64-bit portion of the registry" but I don't know if that means "in addition to" or what. In other words, if I create a registry search for HKLM\Software\CompanyName\ProductName\AppDataPath and then check the "Search the 64-bit portion of the registry" checkbox, will it also look in HKLM\Software\Wow6432Node\CompanyName\ProductName\AppDataPath?
Also, once I've retrieved these values from the registry, I need to do the following:
- if the "AppDataPath" key doesn't exist, then my installer needs to exit
- if the "AppDataPath" and "UserDataPath" keys *do* exist, I need to use the properties that hold their values to determine where my files should be installed
How do I reference the properties that hold these registry values to perform these actions?
Thanks very much!