根据条件跳过某些自定义操作的安装
我对 Windows Installer 完全陌生,所以请温柔一点!
我希望在客户安装我的程序时安装一些驱动程序。但是,如果驱动程序已安装,我希望安装程序跳过该特定步骤并继续安装我的程序。
我尝试添加 Windows Installer 启动条件,该条件会搜索某个组件 ID。 但是,当我尝试安装时,出现错误消息并且安装程序退出 - 没有安装任何内容。 是否安装驱动程序并不重要 - 我得到相同的结果。
有什么线索吗?
提前致谢!
I'm completely new to Windows Installer, so please be gentle!
I want some drivers to be installed when my customers installs my program. If the drivers already is installed, however, I want the installation program to skip that certain step and continue with installing my program.
I have tried adding a Windows Installer launch condition, which searches for a certain component Id.
When I'm trying to install, though, the error message shows up and the installation program exits - nothing is installed.
It doesn't matter if the driver is installed or not - I get the same result.
Any clues?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果不满足启动条件,则安装将停止。这不是您需要的解决方案。
您可以尝试使用搜索来检测驱动程序是否安装:
http://msdn.microsoft.com/en-us/ library/aa367579(VS.85).aspx
您还可以使用立即自定义操作来执行此搜索并根据搜索结果设置安装程序属性。此自定义操作需要您编写自定义代码。它可以是 Win32 DLL:
http://msdn.microsoft .com/en-us/library/aa368338(VS.85).aspx
http://msdn.microsoft.com/en-us/library/aa367457(VS.85).aspx
http://www.advancedinstaller.com/user-guide/serial-number-validation-dll.html(示例C++ DLL)
或 VBScript:
http://msdn.microsoft.com/en-us/ Library/sx7b3k7y(VS.85).aspx
这样您就可以使用自定义属性来调节您的自定义操作。例如,如果该属性为空,则需要安装驱动程序。因此,您的自定义操作可以使用条件:
其中“MY_CUSTOM_PROPERTY”是您根据搜索设置的属性。
A launch condition stops the installation if the condition is not met. This is not a solution for what you need.
You can try detecting if the driver is installed by using a search:
http://msdn.microsoft.com/en-us/library/aa367579(VS.85).aspx
You can also use an immediate custom action which performs this search and sets an installer property based on the search result. This custom action requires custom code written by you. It can be a Win32 DLL:
http://msdn.microsoft.com/en-us/library/aa368338(VS.85).aspx
http://msdn.microsoft.com/en-us/library/aa367457(VS.85).aspx
http://www.advancedinstaller.com/user-guide/serial-number-validation-dll.html (a sample C++ DLL)
or a VBScript:
http://msdn.microsoft.com/en-us/library/sx7b3k7y(VS.85).aspx
This way you can use the custom property to condition your custom action. For example, if the property is empty, the driver needs to be installed. So your custom action can use the condition:
where "MY_CUSTOM_PROPERTY" is the property you set based on a search.