Visual Studio 2010“设置项目"注册表编辑器不起作用 [英] Visual Studio 2010 "Setup Project" registry editor doesn't work

查看:95
本文介绍了Visual Studio 2010“设置项目"注册表编辑器不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个安装项目,需要向注册表添加1个简单的字符串,并且安装项目中的内置注册表编辑器似乎根本不起作用.默认情况下,它会将基本密钥HKEY_LOCAL_MACHINE \ Software \ [Manufacturer]放入安装项目中,甚至不起作用.

I have an installation project that needs to add 1 simple string to the registry, and the built in Registry Editor in the Setup Project doesn't seem to work at all. It puts a base key HKEY_LOCAL_MACHINE\Software\[Manufacturer] by default into the install project, and that doesn't even work.

这是我添加密钥的步骤.

Here are the steps I used to add the key.

  • 右键单击安装项目:视图->注册表
  • 将显示一个模拟注册表,我将根据需要向下钻取创建密钥.
  • 我创建了HKEY_LOCAL_MACHINE \ Software \ [Manufacturer] \ [ProductName]
  • 运行安装程序.没有错误报告,但是键不存在.

编辑:在

EDIT: Take a look at figure 5 on this webpage. It shows you kinda of what I see except in what looks like a much older version of visual studio.

我不知道这怎么可能失败,它应该是如此简单.我什至尝试了简单的键,它不会创建任何东西,或者至少会引发错误.我已经看到了这个解决方案,但是它荒谬的是添加一个后生成步骤,以在具有内置功能时手动编辑注册表.该帖子表明该功能已损坏,因此请不要使用它.

I don't see how this could fail, it should be so simple. I've even tried simple keys and it just won't create anything, or at least throw an error. I've seen this solution but its ridiculous to add a post build step to manually edit the registry when there is built in functionality to do it. That post indicates that the feature is just broken, so don't use it.

推荐答案

如果您使用的是32位安装程序,则密钥将重定向到HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \密钥下

If you have a 32-bit installer the keys will be redirected under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ key

您可以在这里找到更多详细信息:

More details you can find here: http://msdn.microsoft.com/en-us/library/windows/desktop/aa384232(v=vs.85).aspx

这篇关于Visual Studio 2010“设置项目"注册表编辑器不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆