How can I continue the installation from the point

2020-03-31 04:05发布

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.

标签: wix wix3.6
1条回答
在下西门庆
2楼-- · 2020-03-31 04:29

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.

查看更多
登录 后发表回答