简体   繁体   English

如何使用VS2010注册表编辑器创建针对64位操作系统的自定义注册表项“Programmable”

[英]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 . 在注册表视图中,我使用以下路径HKCR\\CLSID\\{MYGUID}\\Programmable手动创建Programmable密钥。 I think there's no problem on 32-bit OS. 我认为32位操作系统没有问题。

However, on 64-bit OS, Programmable somehow gets missed. 但是,在64位操作系统上, Programmable错过了。 I guess it probably has something to do with registry redirection on 64-bit. 我想这可能与64位注册表重定向有关。 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} . 看一下注册表,我发现CLSID\\{MYGUID}实际上位于@ HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\Wow6432Node\\CLSID\\{MYGUID}并且在{MYGUID}下没有创建Programmable密钥。

So my question is - do I have to manually specify the Programmable key @ HKLM\\SOFTWARE\\CLasses\\Wow6432Node\\CLSID\\{MYGUID}\\Programmable as well? 所以我的问题是 - 我是否必须手动指定Programmable键@ HKLM\\SOFTWARE\\CLasses\\Wow6432Node\\CLSID\\{MYGUID}\\Programmable Do I need to change the target platform to x64 ? 我是否需要将目标平台更改为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. 不确定你究竟是在问什么,但你肯定会遇到64位Windows上32位进程的注册表重定向导致的问题。

This problem only occurs on 64 bit Windows. 此问题仅发生在64位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: 例如,您可以使用Regedit:

  • Your application is a 32 bit application: Use 32 bit Regedit ( %SystemRoot%\\SysWOW64\\regedit.exe ). 您的应用程序是32位应用程序:使用32位Regedit( %SystemRoot%\\SysWOW64\\regedit.exe )。

  • Your application is a 64 bit application: Use 64 bit Regedit ( %SystemRoot%\\regedit.exe ). 您的应用程序是64位应用程序:使用64位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. 如果由于某种原因您想使用64位工具为32位应用程序设置注册表项和值,则需要了解如何执行注册表重定向。 For instance, HKLM\\Software is redirected to HKLM\\Software\\Wow6432Node . 例如, HKLM\\Software被重定向到HKLM\\Software\\Wow6432Node The details are explained in the Microsoft Support article linked above. 有关详细信息,请参阅上面链接的Microsoft支持文章。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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