VS 设置向导损伤 - 也许有替代方案?

发布于 2024-10-04 02:53:03 字数 713 浏览 3 评论 0原文

仅当 Visual Studio 的安装向导项目在注册表 (a) 中找到某个键​​时,它才能够部署部分文件吗?如果没有,那么当某个注册表项存在时,可能会启动另一个安装程序文件(b)?

(a) 我一直在尝试通过VS的.msi文件部署winamp插件。 2 个问题:

  • 失败时必须自动获取 {winamp}/plugins 文件夹的路径
  • ,应该向用户显示一个对话框来选择将插件安装到的位置

(b) 试图克服 (a) NSIS 安装程序的问题仅用于打包 winamp .dll 插件;然而,这引入了另一个问题:

  • 如果用户没有安装 winamp,则必须手动取消 NSIS 生成的子安装程序,这总是会导致 VS 生成的主安装程序失败(虽然不应该,winamp 不是我正在部署的整个应用程序的良好功能)
  • 我在某些注册表键检测上有条件地启动子安装程序的两种方法都失败了(尝试查找 Winamp 的 ProgID 密钥)。第一次失败是因为即使在安装了 winamp 的计算机上也找不到 ProgID 密钥(手动检查密钥,它就在那里),第二次失败是因为这种条件启动不能仅应用于子进程-安装程序,但仅限于主安装程序。

我正在考虑完全放弃 VS 项目向导,而只是转向 NSIS 安装程序向导。但我不想学习编写脚本来部署解决方案的每个组件。有 GUI 版本吗?或者我应该开始学习 Orca 并将其用于 VSPW 的输出 .msi 文件?或者什么?

谢谢

Is Visual Studio's Setup Wizard project able to only deploy some of the files only if it finds a certain key into the registry (a) ? If not, then maybe launch another installer file when that certain reg key is present (b) ?

(a) I have been trying to deploy a winamp plugin through VS's .msi files. 2 problems:

  • the path to {winamp}/plugins folder has to be obtained automatically
  • on failure, user should be presented with a dialog to choose where to install the plugin to

(b) In an attempt to overcome (a) the NSIS installer was used for only packaging the winamp .dll plugin; however, this introduced another issue:

  • if user does not have winamp installed, the NSIS generated sub-installer must be manually canceled, and this invariably causes the main VS generated installer to fail (while it shoud not, winamp is not an essential part of the good functionning of the whole app I am deploying)
  • I have failed in 2 ways to conditionally launch the sub-installer on a certain reg key detection (tried to look for the ProgID key of Winamp). First failure was because the ProgID key is not found even on machines that do have winamp installed (manually checked for the key, it was there), and second failure was due to the fat that such conditional launch could not be applied to just the sub-installer, but to the main installer only.

I am thinking of dumping the VS project wizard altogether and just move to NSIS installer wizard.. but I would not want to learn to script it for deploying each component of my solution. Any GUI version for it ? Or should I start learning Orca and use it on the VSPW's output .msi file ? Or what ?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

笑看君怀她人 2024-10-11 02:53:03

如果您想使用 MSI,方法如下:
- 创建注册表项的搜索
- 使用搜索结果(它存储在安装程序属性中)来调整文件的组件
- 使用相同的结果来调节安装文件夹对话框

这可以在商业安装工具中轻松完成。但如果你想要一个免费的解决方案,Sandeep 是对的,Wix 非常好。

If you want to use a MSI the approach is this:
- create a search for the registry entry
- use the search result (it's stored in an installer property) to condition the components of your files
- use the same result to condition the installation folder dialog

This can easily be done in commercial setup tools. But if you want a free solution, Sandeep is right, Wix is very good.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文