c# - Cannot find registry key in WOW64 mode -


I am using this code to get a key from the registry:

  Registry mykey = Registry.CurrentUser.OpenSubKey ("Software \\ Publisher \\ Product", true);  

More key exists in the registry under

  HKCU \ Software \ Publisher \ Product  

, my code X86 has been compiled and it is running on an x86_64 machine. Therefore, I think that under

  HKCU \ Software \ WOW6432Node \ Publisher \ Product  

Make the key However, the key is not found.

How can I change my registry to search this key on x86_64 machine (I can not change the code)?

Comments