简体   繁体   中英

How to create custom registry key 'Programmable' targeted on 64bit OS with VS2010 registry editor

In the registry view, I manually created Programmable key using the following path HKCR\\CLSID\\{MYGUID}\\Programmable . I think there's no problem on 32-bit OS.

However, on 64-bit OS, Programmable somehow gets missed. I guess it probably has something to do with registry redirection on 64-bit. Taking a look at the registry, I find CLSID\\{MYGUID} is actually located @ HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\Wow6432Node\\CLSID\\{MYGUID} and there is no Programmable key created under {MYGUID} .

So my question is - do I have to manually specify the Programmable key @ HKLM\\SOFTWARE\\CLasses\\Wow6432Node\\CLSID\\{MYGUID}\\Programmable as well? Do I need to change the target platform to x64 ?

Not sure exactly what you are asking but it certainly seems that you are facing a problem caused by registry redirection of a 32 bit process on 64 bit Windows.

This problem only occurs on 64 bit Windows. If your application requires some values in the registry you should set these values using a tool that runs using "the same number of bits" as your application. For instance you can use Regedit:

  • Your application is a 32 bit application: Use 32 bit Regedit ( %SystemRoot%\\SysWOW64\\regedit.exe ).

  • Your application is a 64 bit application: Use 64 bit Regedit ( %SystemRoot%\\regedit.exe ).

If for some reason you want to use a 64 bit tool to set registry keys and values for a 32 bit application you need to understand how registry redirection is performed. For instance, HKLM\\Software is redirected to HKLM\\Software\\Wow6432Node . The details are explained in the Microsoft Support article linked above.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM