首页 > 解决方案 > 卸载后Wix强制重启

问题描述

我想强制用户卸载后重新启动。

我发现了这种可能性: <ForceRebootAfter="InstallFinalize">REMOVE='ALL'

 <InstallExecuteSequence>           
  <Custom Action="TopShelfServiceInstall"
          After="InstallFiles">NOT Installed</Custom>

  <Custom Action="TopShelfServiceUninstall"
          After='InstallInitialize'>(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>

  <Custom Action="ActivateBarcodeReaderAx"
          Before="InstallFinalize">NOT Installed</Custom>

  <ForceReboot After="InstallFinalize">REMOVE='ALL'</ForceReboot>
</InstallExecuteSequence>

如果没有 ForceReboot,安装程序将正常工作。

但是,在编译时,总是会出现以下错误:

ICE27:InstallExecuteSequence 表中的“ForceReboot”操作位置错误。当前:执行后,正确:执行

ICE03:错误的条件字符串;表:InstallExecuteSequence,列:条件,键:ForceReboot

不幸的是,我不知道这条指令应该去哪里。先感谢您。

标签: visual-studiowixwindows-installeruninstallation

解决方案


推荐阅读