我有一个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