是的,你說得對。你需要在包中使用的退出代碼:
<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 < 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>
一旦這已經重新啓動,它將繼續進行安裝,假設你使用的是最新版本。有一個引導程序在重新啓動後不會繼續的錯誤。
爲什麼在 裏面沒有'Value =「」'? –
@PeterMortensen @PeterMortensen如果你沒有指定一個,它將強制重新啓動所有「從可執行程序包返回的退出代碼。如果沒有提供任何值,則表示所有值都沒有明確設置爲默認的行爲。」 http://wixtoolset.org/documentation/manual/v3/xsd/wix/exitcode.html –