Visual Studio 2010的安装项目的64位创建注册表项问题 [英] Visual Studio 2010 Setup Project 64 bit create registry key issue
问题描述
我有一个64位的安装项目在64位的Windows服务的EXE和DLL。在我的安装程序类我创建注册表项与此code:
I have a 64 bit setup project with a 64 bit windows service exe and dlls. In my installer class i create registry keys with this code:
using (typeKey = typeKey.CreateSubKey(@"SOFTWARE\Folder\Folder\Folder"))
{
typeKey.SetValue("Type", 0);
typeKey.Close();
}
但它一直在SOFTWARE \ WOW6432NODE \ SOFTWARE \文件夹\文件夹\文件夹中创建注册表项。 顺便说一句设置副本下的64位程序文件夹EXE和DLL。在复制文件夹到64位的文件夹没有问题。
But it keeps creating registry keys at SOFTWARE\WOW6432NODE\SOFTWARE\FOLDER\FOLDER\FOLDER. Btw setup copies exe and dlls under 64bit program files folder. No problem in copying folders to 64 bit folder.
你知道吗?
推荐答案
您使用的是.NET 4,使用新的 RegistryKey.OpenBaseKey()的方法,并通过RegistryView.Registry64
You are using .NET 4, use the new RegistryKey.OpenBaseKey() method and pass RegistryView.Registry64
这篇关于Visual Studio 2010的安装项目的64位创建注册表项问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!