我有一个Wix引导程序,对于解决此问题的情况,它安装了一个msi。如果用户取消中间安装,或者由于使用中的文件而导致安装无法完成,则引导程序将启动回滚过程。已正确清理了部分安装的msi,并删除了文件。但是,wix引导程序的ARP条目仍然存在。没有其他安装的msis。没有任何东西被标记为永久性的。在我看来,由于未安装任何ARP条目,因此应将其删除。这是XML:
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<?include "$(var.ProjectDir)WixVariables.wxi" ?>
<Bundle Name="$(var.ProductDescription)" UpgradeCode="$(var.UpgradeCode)" Version="$(var.Version)"
Manufacturer="FlexSim Software Products, Inc." AboutUrl="https://www.flexsim.com"
IconSourceFile="$(var.ProjectDir)..\FlexSimBootstrapper\Resources\flexsim.ico"
DisableModify="yes" Tag="FlexSim">
<RelatedBundle Id="$(var.UpgradeCode)" Action="Upgrade"/>
<!-- <Update Location="https://www.flexsim.com/sw/installers/?version=[Version]" /> -->
<BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost">
<Payload SourceFile="$(var.ProjectDir)..\FlexSimBootstrapper\BootstrapperCore.config"/>
<Payload SourceFile="$(var.ProjectDir)..\FlexSimBootstrapper\bin\FlexSimBootstrapper.dll"/>
<Payload SourceFile="$(var.ProjectDir)..\FlexSimBootstrapper\bin\GalaSoft.MvvmLight.dll"/>
<Payload SourceFile="C:\Program Files (x86)\WiX Toolset v3.11\SDK\Microsoft.Deployment.WindowsInstaller.dll"/>
</BootstrapperApplicationRef>
<Variable Name="InstallFolder" bal:Overridable="yes" />
<WixVariable Id="WixMbaPrereqPackageId" Value="Netfx4Full" />
<WixVariable Id="WixMbaPrereqLicenseUrl" Value="NetfxLicense.rtf" />
<util:FileSearch Id="UCRTFileSearch" Path="[SystemFolder]ucrtbase.dll" Result="exists" Variable="UCRTInstalled"/>
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="Netfx4FullVersion" />
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="Netfx4x64FullVersion" Win64="yes" />
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\FlexSim\$(var.FullProductName)" Value="InstallDir" Variable="PreviousInstallDirx86" Win64="no" />
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\FlexSim\$(var.FullProductName)" Value="InstallDir" Variable="PreviousInstallDirx64" Win64="yes" />
<Chain>
<!-- 64-bit FlexSim -->
<MsiPackage Id="FlexSim_x64"
Name="flexsim__$(var.Version).$(var.Beta)_x64"
SourceFile="$(var.ProjectDir)..\Installers\FlexSimMsiInstaller_x64.msi"
Description="$(var.FullProductName) Installer Setup Program"
DisplayInternalUI="no"
Cache="yes"
Vital="no"
Compressed="no"
Visible="no"
DownloadUrl="https://www.flexsim.com/sw/installers/?i={2}">
<MsiProperty Name="INSTALLDIR" Value="[InstallFolder]" />
</MsiPackage>
</Chain>
</Bundle>
</Wix>
刻录日志:
[30E4:5298][2019-02-16T22:19:37]i001: Burn v3.11.0.1701, Windows v10.0 (Build 15063: Service Pack 0), path: C:\Users\MATTLO~1.FLE\AppData\Local\Temp\{B3770523-AB08-419B-88D6-CE62D93B000F}\.cr\FlexSimInstaller.exe
[30E4:5298][2019-02-16T22:19:37]i009: Command Line: '-burn.clean.room=C:\Users\matt.long.FLEXSIM\Documents\FlexSimBootstrapper\BootstrapperSetup\bin\FlexSimInstaller.exe -burn.filehandle.attached=572 -burn.filehandle.self=512'
[30E4:5298][2019-02-16T22:19:37]i000: Setting string variable 'WixBundleOriginalSource' to value 'C:\Users\matt.long.FLEXSIM\Documents\FlexSimBootstrapper\BootstrapperSetup\bin\FlexSimInstaller.exe'
[30E4:5298][2019-02-16T22:19:37]i000: Setting string variable 'WixBundleOriginalSourceFolder' to value 'C:\Users\matt.long.FLEXSIM\Documents\FlexSimBootstrapper\BootstrapperSetup\bin\'
[30E4:5298][2019-02-16T22:19:37]i000: Setting string variable 'WixBundleLog' to value 'C:\Users\MATTLO~1.FLE\AppData\Local\Temp\FlexSim_2019_20190216221937.log'
[30E4:5298][2019-02-16T22:19:37]i000: Setting string variable 'WixBundleName' to value 'FlexSim 2019'
[30E4:5298][2019-02-16T22:19:37]i000: Setting string variable 'WixBundleManufacturer' to value 'FlexSim Software Products, Inc.'
[30E4:5298][2019-02-16T22:19:37]i000: Loading managed bootstrapper application.
[30E4:5298][2019-02-16T22:19:37]i000: Creating BA thread to run asynchronously.
[30E4:3DB0][2019-02-16T22:19:37]i000: Launching FlexSimBootstrapper UX
[30E4:5298][2019-02-16T22:19:37]i100: Detect begin, 1 packages
[30E4:5298][2019-02-16T22:19:37]i000: Setting numeric variable 'UCRTInstalled' to value 1
[30E4:5298][2019-02-16T22:19:37]i000: Setting string variable 'Netfx4x64FullVersion' to value '4.7.02046'
[30E4:5298][2019-02-16T22:19:37]i000: Setting string variable 'Netfx4FullVersion' to value '4.7.02046'
[30E4:5298][2019-02-16T22:19:37]i000: Registry key not found. Key = 'SOFTWARE\FlexSim\FlexSim 2019'
[30E4:5298][2019-02-16T22:19:37]i000: Registry key not found. Key = 'SOFTWARE\FlexSim\FlexSim 2019'
[30E4:5298][2019-02-16T22:19:37]i101: Detected package: FlexSim_x64, state: Absent, cached: None
[30E4:5298][2019-02-16T22:19:37]i199: Detect complete, result: 0x0
[30E4:3DB0][2019-02-16T22:19:51]i000: Setting string variable 'InstallFolder' to value 'C:\Program Files\FlexSim 2019'
[30E4:5298][2019-02-16T22:19:51]i200: Plan begin, 1 packages, action: Install
[30E4:5298][2019-02-16T22:19:51]i000: Setting string variable 'WixBundleRollbackLog_FlexSim_x64' to value 'C:\Users\MATTLO~1.FLE\AppData\Local\Temp\FlexSim_2019_20190216221937_000_FlexSim_x64_rollback.log'
[30E4:5298][2019-02-16T22:19:51]i000: Setting string variable 'WixBundleLog_FlexSim_x64' to value 'C:\Users\MATTLO~1.FLE\AppData\Local\Temp\FlexSim_2019_20190216221937_000_FlexSim_x64.log'
[30E4:5298][2019-02-16T22:19:51]i201: Planned package: FlexSim_x64, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: Yes, uncache: No, dependency: Register
[30E4:5298][2019-02-16T22:19:51]i299: Plan complete, result: 0x0
[30E4:5298][2019-02-16T22:19:51]i300: Apply begin
[30E4:5298][2019-02-16T22:19:51]i010: Launching elevated engine process.
[30E4:5298][2019-02-16T22:19:52]i011: Launched elevated engine process.
[30E4:5298][2019-02-16T22:19:52]i012: Connected to elevated engine.
[4540:4C1C][2019-02-16T22:19:52]i358: Pausing automatic updates.
[4540:4C1C][2019-02-16T22:19:52]i359: Paused automatic updates.
[4540:4C1C][2019-02-16T22:19:52]i360: Creating a system restore point.
[4540:4C1C][2019-02-16T22:19:52]i361: Created a system restore point.
[4540:4C1C][2019-02-16T22:19:52]i370: Session begin, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{73366aa7-1a2c-44d4-a6f6-9a0536ab698f}, options: 0x7, disable resume: No
[4540:4C1C][2019-02-16T22:19:54]i000: Caching bundle from: 'C:\Users\MATTLO~1.FLE\AppData\Local\Temp\{8B0C2DBA-89AE-4102-A89F-81E466CB0A54}\.be\FlexSimInstaller.exe' to: 'C:\ProgramData\Package Cache\{73366aa7-1a2c-44d4-a6f6-9a0536ab698f}\FlexSimInstaller.exe'
[4540:4C1C][2019-02-16T22:19:54]i320: Registering bundle dependency provider: {73366aa7-1a2c-44d4-a6f6-9a0536ab698f}, version: 19.0.1.0
[4540:4C1C][2019-02-16T22:19:54]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{73366aa7-1a2c-44d4-a6f6-9a0536ab698f}, resume: Active, restart initiated: No, disable resume: No
[30E4:1504][2019-02-16T22:19:54]i338: Acquiring package: FlexSim_x64, payload: FlexSim_x64, copy from: C:\Users\matt.long.FLEXSIM\Documents\FlexSimBootstrapper\BootstrapperSetup\bin\flexsim__19.0.1._x64
[30E4:1504][2019-02-16T22:19:54]i000: Setting string variable 'WixBundleLastUsedSource' to value 'C:\Users\matt.long.FLEXSIM\Documents\FlexSimBootstrapper\BootstrapperSetup\bin\'
[4540:0608][2019-02-16T22:19:55]i305: Verified acquired payload: FlexSim_x64 at path: C:\ProgramData\Package Cache\.unverified\FlexSim_x64, moving to: C:\ProgramData\Package Cache\{06448ACE-FFEC-4C33-B938-0104F3AC87D9}v17.0.2\flexsim__19.0.1._x64.
[4540:4C1C][2019-02-16T22:19:55]i323: Registering package dependency provider: {06448ACE-FFEC-4C33-B938-0104F3AC87D9}, version: 17.0.2, package: FlexSim_x64
[4540:4C1C][2019-02-16T22:19:55]i301: Applying execute package: FlexSim_x64, action: Install, path: C:\ProgramData\Package Cache\{06448ACE-FFEC-4C33-B938-0104F3AC87D9}v17.0.2\flexsim__19.0.1._x64, arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" INSTALLDIR="C:\Program Files\FlexSim 2019"'
[4540:4C1C][2019-02-16T22:20:31]e000: Error 0x80070642: Failed to install MSI package.
[4540:4C1C][2019-02-16T22:20:31]e000: Error 0x80070642: Failed to execute MSI package.
[30E4:5298][2019-02-16T22:20:31]e000: Error 0x80070642: Failed to configure per-machine MSI package.
[30E4:5298][2019-02-16T22:20:31]w350: Applied non-vital package: FlexSim_x64, encountered error: 0x80070642. Continuing...
[4540:4C1C][2019-02-16T22:20:31]i325: Registering dependency: {73366aa7-1a2c-44d4-a6f6-9a0536ab698f} on package provider: {06448ACE-FFEC-4C33-B938-0104F3AC87D9}, package: FlexSim_x64
[4540:4C1C][2019-02-16T22:20:31]i372: Session end, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{73366aa7-1a2c-44d4-a6f6-9a0536ab698f}, resume: ARP, restart: None, disable resume: No
[4540:4C1C][2019-02-16T22:20:31]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{73366aa7-1a2c-44d4-a6f6-9a0536ab698f}, resume: ARP, restart initiated: No, disable resume: No
[30E4:5298][2019-02-16T22:20:31]i399: Apply complete, result: 0x0, restart: None, ba requested restart: No
[30E4:5298][2019-02-16T22:20:32]i500: Shutting down, exit code: 0x642
[30E4:5298][2019-02-16T22:20:32]i410: Variable: InstallFolder = C:\Program Files\FlexSim 2019
[30E4:5298][2019-02-16T22:20:32]i410: Variable: Netfx4FullVersion = 4.7.02046
[30E4:5298][2019-02-16T22:20:32]i410: Variable: Netfx4x64FullVersion = 4.7.02046
[30E4:5298][2019-02-16T22:20:32]i410: Variable: SystemFolder = C:\WINDOWS\SysWOW64\
[30E4:5298][2019-02-16T22:20:32]i410: Variable: UCRTInstalled = 1
[30E4:5298][2019-02-16T22:20:32]i410: Variable: WixBundleAction = 5
[30E4:5298][2019-02-16T22:20:32]i410: Variable: WixBundleElevated = 1
[30E4:5298][2019-02-16T22:20:32]i410: Variable: WixBundleLastUsedSource = C:\Users\matt.long.FLEXSIM\Documents\FlexSimBootstrapper\BootstrapperSetup\bin\
[30E4:5298][2019-02-16T22:20:32]i410: Variable: WixBundleLog = C:\Users\MATTLO~1.FLE\AppData\Local\Temp\FlexSim_2019_20190216221937.log
[30E4:5298][2019-02-16T22:20:32]i410: Variable: WixBundleLog_FlexSim_x64 = C:\Users\MATTLO~1.FLE\AppData\Local\Temp\FlexSim_2019_20190216221937_000_FlexSim_x64.log
[30E4:5298][2019-02-16T22:20:32]i410: Variable: WixBundleManufacturer = FlexSim Software Products, Inc.
[30E4:5298][2019-02-16T22:20:32]i410: Variable: WixBundleName = FlexSim 2019
[30E4:5298][2019-02-16T22:20:32]i410: Variable: WixBundleOriginalSource = C:\Users\matt.long.FLEXSIM\Documents\FlexSimBootstrapper\BootstrapperSetup\bin\FlexSimInstaller.exe
[30E4:5298][2019-02-16T22:20:32]i410: Variable: WixBundleOriginalSourceFolder = C:\Users\matt.long.FLEXSIM\Documents\FlexSimBootstrapper\BootstrapperSetup\bin\
[30E4:5298][2019-02-16T22:20:32]i410: Variable: WixBundleProviderKey = {73366aa7-1a2c-44d4-a6f6-9a0536ab698f}
[30E4:5298][2019-02-16T22:20:32]i410: Variable: WixBundleRollbackLog_FlexSim_x64 = C:\Users\MATTLO~1.FLE\AppData\Local\Temp\FlexSim_2019_20190216221937_000_FlexSim_x64_rollback.log
[30E4:5298][2019-02-16T22:20:32]i410: Variable: WixBundleSourceProcessFolder = C:\Users\matt.long.FLEXSIM\Documents\FlexSimBootstrapper\BootstrapperSetup\bin\
[30E4:5298][2019-02-16T22:20:32]i410: Variable: WixBundleSourceProcessPath = C:\Users\matt.long.FLEXSIM\Documents\FlexSimBootstrapper\BootstrapperSetup\bin\FlexSimInstaller.exe
[30E4:5298][2019-02-16T22:20:32]i410: Variable: WixBundleTag = FlexSim
[30E4:5298][2019-02-16T22:20:32]i410: Variable: WixBundleUILevel = 4
[30E4:5298][2019-02-16T22:20:32]i410: Variable: WixBundleVersion = 19.0.1.0
[30E4:5298][2019-02-16T22:20:32]i007: Exit code: 0x642, restarting: No
答案 0 :(得分:1)
重要属性 :我认为原因是您已将 MsiPackage
设置为 {{1 }} 。执行此操作时,您告诉Bundle继续安装,即使它回滚了有问题的MSI。因此,请尝试设置 Vital="no"
并再次进行测试。
评论 :请注意,我使用测试包进行了测试,而不是上面的代码-主要区别是您的自定义引导程序应用程序,而我使用的是默认的一。因此,可能还有其他原因导致出现此问题-例如,您自定义的bootstrapper应用程序或我从未尝试过的RelatedBundle构造。