Mut*_*ran 4 windows-installer custom-action wix uninstall
我正在为我们的产品开发基于WIX的instller,它有一个基础产品和许多插件.Base和plug-in将作为单独的MSI发布.只有在可用时才能安装插件.Base和插件在ROOT文件夹下共享公共文件夹树,如"C:\ Program files\MyProduct".
我正在使用自定义操作卸载所有相关插件.但是插件没有正确卸载.这是非常随机的.有时三个插件被卸载,有时只有两个插件.但我可以从添加/删除程序中单独卸载插件.
我正在使用以下自定义操作...
<Fragment>
<CustomAction Id='UninstallP1Action' Directory='SystemFolder' ExeCommand="[SystemFolder]MSIExec.exe /X {PRODUCT_CODE_HERE} /qn /l* $(env.windir)\Temp\p1.log" Execute='immediate' Return='asyncNoWait' />
<CustomAction Id='UninstallP2Action' Directory='SystemFolder' ExeCommand="[SystemFolder]MSIExec.exe /X {PRODUCT_CODE_HERE} /qn /l* $(env.windir)\Temp\p2.log" Execute='immediate' Return='asyncNoWait' />
<CustomAction Id='UninstallP3Action' Directory='SystemFolder' ExeCommand="[SystemFolder]MSIExec.exe /X {PRODUCT_CODE_HERE} /qn /l* $(env.windir)\Temp\p3.log" Execute='immediate' Return='asyncNoWait' />
<CustomAction Id='UninstallP4Action' Directory='SystemFolder' ExeCommand="[SystemFolder]MSIExec.exe /X {PRODUCT_CODE_HERE} /qn /l* $(env.windir)\Temp\p4.log" Execute='immediate' Return='asyncNoWait' />
<CustomAction Id='UninstallP4Action' Directory='SystemFolder' ExeCommand="[SystemFolder]MSIExec.exe /X {PRODUCT_CODE_HERE} /qn /l* $(env.windir)\Temp\p4.log" Execute='immediate' Return='asyncNoWait' />
</Fragment>
Run Code Online (Sandbox Code Playgroud)
我在我的产品脚本中称这个CA为...
<!--Uninstall Plug-ins -->
<Custom Action='UninstallP1Action' After='InstallFinalize'>(REMOVE="ALL")</Custom>
<Custom Action='UninstallP2Action' After='UninstallP1Action'>(REMOVE="ALL")</Custom>
<Custom Action='UninstallP3Action' After='UninstallP2Action'>(REMOVE="ALL")</Custom>
<Custom Action='UninstallP4Action' After='UninstallP3Action'>(REMOVE="ALL")</Custom>
<Custom Action='UninstallP5Action' After='UninstallP4Action'>(REMOVE="ALL")</Custom>
Run Code Online (Sandbox Code Playgroud)
我的问题是,
卸载base时如何彻底卸载所有插件?
卸载时缺少插件时,不会创建日志.但是,在正确卸载插件时,日志已成功创建.怎么检查这个?
我知道在单个MSI中创建功能(针对不同的插件).但我们的计划是将插件作为单独的MSI发布.WiX中还有其他可能的方式吗?
任何帮助将非常感激!
卸载base时如何彻底卸载所有插件?
您的卸载自定义操作不会等待返回.所以他们基本上是一个接一个地启动卸载命令,而不是等待每个进程完成.
Windows Installer不支持同时运行的两个InstallExecuteSequences.所以两个卸载过程不能同时运行.由于您同时启动了多个卸载过程,因此其中一些失败.
解决方案是使用BAT文件来执行卸载命令.它会在启动下一个命令之前等待每个命令完成.缺点是卸载完成后无法轻松地从目标计算机中删除BAT.
卸载时缺少插件时,不会创建日志.但是,在正确卸载插件时,日志已成功创建.怎么检查这个?
Windows Installer会自动检测冲突的安装或卸载进程.因此,在开始编写日志之前,您的插件卸载失败.
我知道在单个MSI中创建功能(针对不同的插件).但我们的计划是将插件作为单独的MSI发布.WiX中还有其他可能的方式吗?
并不是的.
归档时间: |
|
查看次数: |
2281 次 |
最近记录: |