Visual Studio部署项目:安装目录中的依赖项

发布于 2024-10-07 17:55:00 字数 227 浏览 0 评论 0原文

我想为应用程序安装一个附加组件。该应用程序不会创建我可以用来定位它的注册表项。因此,用户应该指定程序的目录,安装程序应该检查程序文件是否在该目录中,并且只有当主程序安装到该目录时,才将附加组件安装到该目录。

这可以通过 Visual Studio 的部署项目来完成吗?

据我所知,VS 部署项目仅在启动安装程序时检查依赖项,而不是在指定安装目录后检查依赖项。在开始使用更高级的部署工具之前,我想获得第二意见。

I would like to install an add-on to an application. The application does not create a registry key that I can use to locate it. Therefore the user should specify the directory of the program, the installer should check whether the programs files are in that directory and only if the main program is installed to that directory, install the add-on to that directory.

Can this be done with Visual Studio's Deployment Project?

As far as I can see, the VS Deployment Project checks for dependencies only when starting the installer, not after the installation directory has been specified. Id like to get a second opinion before starting to use more advanced deployment tools.

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

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

发布评论

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

评论(1

夜巴黎 2024-10-14 17:55:00

不,Visual Studio 不支持此功能。

您可以通过在文件夹路径对话框的“下一步”按钮上使用自定义操作来完成您需要的操作:
http://msdn.microsoft.com/en-us/ library/aa368322(VS.85).aspx

此自定义操作可以检查所需文件是否存在并将结果设置在安装程序属性中。然后可以使用此属性来调节显示下一个对话框的“NewDialog”控件事件。它还可用于调节另一个显示自定义错误消息的自定义操作。

如果您想要免费的解决方案,您可以尝试 WiX。您应该能够定义自定义操作和 DoAction 发布的控件事件。

No, this is not supported by Visual Studio.

What you need can be done by using a custom action on the "Next" button of the folder path dialog:
http://msdn.microsoft.com/en-us/library/aa368322(VS.85).aspx

This custom action can check if the required files exist and set the result in an installer property. This property can then be used to condition the "NewDialog" control event which shows the next dialog. It can also be used to condition another custom action which shows a custom error message.

If you want a free solution you can try WiX. You should be able to define the custom action and DoAction published control event.

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