在卸载 Wix 安装程序时禁用 StartIIS7Configuration 事务
我在使用 Wix 安装程序时遇到问题,该安装程序涵盖三个不同的功能集(客户端/开发人员和服务器)。
选择“客户端”后,安装程序不需要使用 IIS 执行任何在此功能中未包含的组件中定义的操作。
安装时我没有遇到问题,因为我添加了一个自定义操作
<!-- Only perform the IIS Configuration if we have installed the Admin Application-->
<Custom Action="SkipIISCA" Before="InstallValidate">
<![CDATA[COMPONENT_TYPE = 2]]>
</Custom>
,该操作仅在安装“客户端”组件类型时运行。自定义操作将 SKIPCONFIGUREIIS 属性设置为 1
在安装程序上执行卸载修复时会出现问题。卸载或修复产品时似乎正在尝试 IIS 配置,并且似乎未运行自定义操作来禁用此行为。
有没有一种好方法可以根据注册表设置来设置卸载/修复的 SKIPCONFIGUREIIS 设置?
谢谢。
I am having a problem with a Wix installer, that covers three different feature sets (Client / Developer and Server).
When Client is selected the installer does not need to perform any of the actions with IIS that are defined in components that aren't included within this feature.
On Installation I don't get a problem, as I have added a Custom Action
<!-- Only perform the IIS Configuration if we have installed the Admin Application-->
<Custom Action="SkipIISCA" Before="InstallValidate">
<![CDATA[COMPONENT_TYPE = 2]]>
</Custom>
Which is only run when the "Client" component type is being installed. The custom action sets the SKIPCONFIGUREIIS property to 1
The problem occurs when either a Repair on an uninstall is executed on the installer. It appears that IIS Configuration is being attempted when the product is being uninstalled or repaired, and the custom action does not seem be run to disable this behaviour.
Is there a good way to set the SKIPCONFIGUREIIS setting on uninstallation / repair based on a Registry Setting ?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
安装过程中设置的一些属性存储在隐藏的 Windows 目录 c:\windows\installer 中 - 每个安装一个。在卸载/修复会话的日志中,您可以看到已打开缓存文件并为新的卸载/修复会话设置属性。 (或者,您可以从卸载/修复日志中找到此临时文件,并使用 Orca 打开它。在 Orca 中的“属性”下,它将显示保存的任何安装属性的值)。
根据上述描述,我敢打赌,正在设置的自定义操作的属性不会被存储,但 COMPONENT_TYPE 的值可用(与在自定义操作中设置 SKIPCONFIGUREIIS 所使用的输入相同)。
如果是这样,则只需使 IIS 配置操作基于这些属性:
如果您不希望在卸载/修复期间为任何功能集发生配置IIS,则只需使用这些属性:
另一件需要考虑的事情是如果原始安装程序位于一个级别 - 例如客户端,并且卸载/修复由服务器级别的人员完成。原始安装的 component_type 被存储。在这种情况下,您可能会考虑在卸载/修复期间添加对如何确定 component_type(通过对话框或某些其他属性)的检查。
Some of the properties set during an installation are stored in the hidden windows directory, c:\windows\installer - one per installation. In the log of your uninstall/repair session, you can see that cached file opened up and properties being set for the new uninstall/repair session. (Alternatively, you can find this temp file from the uninstall/repair log, and open it with Orca. In Orca, under "Property", it will show the values of any install properties saved).
Based on the above description, I bet that the property that the custom action is being set is not stored, but that the value of COMPONENT_TYPE is available (The same input that was used to set SKIPCONFIGUREIIS in the custom action).
If so, then just make the IIS configuration action be based on these properties:
If you don't want the ConfigureIIS to happen for any feature set during uninstall/repair, then just use these properties:
Another thing to think about is if the original installer was at one level - e.g. a client, and the uninstall/repair is being done by someone at the server level. The component_type of the original install is stored. In that case, you might consider adding a check on how the component_type is determined (thru a dialog or some other attribute) during the uninstall/repair.