Visual Studio部署项目:安装目录中的依赖项
我想为应用程序安装一个附加组件。该应用程序不会创建我可以用来定位它的注册表项。因此,用户应该指定程序的目录,安装程序应该检查程序文件是否在该目录中,并且只有当主程序安装到该目录时,才将附加组件安装到该目录。
这可以通过 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,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.