How can I continue the installation from the point it left due to reboot?

旧时模样 提交于 2019-12-19 10:49:27

问题


How can I continue my installer after it reboots during installation of some package?

Actually, I have build an installer package of a project using WiX bundles (having different packages to install in a chain). But when it installs Microsoft Windows Installer 4.5 (.msi) it goes to reboot the PC. After it reboots, I want my installation to continue after that. How can I do that?

I guess we can do it with the use of the exit code, but I don't know how to use it in WiX bundles.


回答1:


Yes, you are right. You need to use an exit code in the Bundle:

<ExePackage Id="WinXP_x86"
              Cache="no"
              Compressed="no"
              PerMachine="yes"
              Permanent="yes"
              Vital="yes"
              Name="redist\WindowsXP-KB942288-v3-x86.exe"
              DownloadUrl="http://download.microsoft.com/download/2/6/1/261fca42-22c0-4f91-9451-0e0f2e08356d/WindowsXP-KB942288-v3-x86.exe"
              InstallCondition="VersionNT=v5.1 AND NOT VersionNT64 AND VersionMsi &lt; v4.5"
              InstallCommand="/quiet /norestart">
    <RemotePayload ProductName="Windows Installer 4.5"
                   Description="Windows Installer 4.5 Setup"
                   CertificatePublicKey="F321408E7C51F8544B98E517D76A8334052E26E8"
                   CertificateThumbprint="D57FAC60F1A8D34877AEB350E83F46F6EFC9E5F1"
                   Hash="86E1CC622DBF4979717B8F76AD73220CDB70400B"
                   Size="3327000"
                   Version="4.5.0.0" />
    <ExitCode Behavior="forceReboot"/>
</ExePackage>

Once this has rebooted, it will continue on with the installation, assuming you are using the latest version. There was a bug where the bootstrapper wouldn't continue after a reboot.



来源:https://stackoverflow.com/questions/11263010/how-can-i-continue-the-installation-from-the-point-it-left-due-to-reboot

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!