Wix Burn Managed Bootstrapper - 无回滚

时间:2016-02-01 10:48:06

标签: sql-server wix rollback burn

我有一个托管引导程序,可以在静默模式下安装SQL Server 2014 Express。安装工作正常,但如果用户取消了设置,那么Burn不会启动回滚?!

以下是Chain定义:

<Chain>
  <ExePackage Id="SQLServer2014SP1_32bit"
              DisplayName="SQL Server 2014 Express SP1 (32 bit)"
              DownloadUrl="https://download.microsoft.com/download/2/D/6/2D6264A9-FA30-4731-920F-F21548052577/DEU/x86/SQLEXPRWT_x86_DEU.exe"
              SourceFile="C:\Test\SQLEXPRWT_x86_DEU.exe"
              Cache="no" Compressed="no" PerMachine="yes" Permanent="yes" Vital="yes"
              InstallCondition="NOT VersionNT64"
              InstallCommand="$(var.SQLServerInstallCommand)"
              RepairCommand="$(var.SQLServerRepairCommand)"
              UninstallCommand="$(var.SQLServerUninstallCommand)">
    <ExitCode Value="3010" Behavior="forceReboot"/>
  </ExePackage>

  <ExePackage Id="SQLServer2014SP1_64bit"
              DisplayName="SQL Server 2014 Express SP1 (64 bit)"
              DownloadUrl="https://download.microsoft.com/download/2/D/6/2D6264A9-FA30-4731-920F-F21548052577/DEU/x64/SQLEXPRWT_x64_DEU.exe"
              SourceFile="C:\Test\SQLEXPRWT_x64_DEU.exe"
              Cache="no" Compressed="no" PerMachine="yes" Permanent="yes" Vital="yes"
              InstallCondition="VersionNT64"
              InstallCommand="$(var.SQLServerInstallCommand)"
              RepairCommand="$(var.SQLServerRepairCommand)"
              UninstallCommand="$(var.SQLServerUninstallCommand)">
    <ExitCode Value="3010" Behavior="forceReboot"/>
  </ExePackage>
</Chain>

如果安装被取消(用户点击我的WPF GUI中的取消按钮),我将e.Result设置为Result.Cancel

e.Result = Result.Cancel;

但是Burn还没有开始回滚?我做错了什么?

编辑:以下是刻录日志:

[0684:0A34][2016-02-02T15:20:11]i001: Burn v3.10.2.2516, Windows v6.2 (Build 9200: Service Pack 0), path: C:\Users\ADMINI~1\AppData\Local\Temp\2\{29D547AE-EAFB-4EA2-BB8A-C83CC04750C8}\.cr\SQL Setup.exe
[0684:0A34][2016-02-02T15:20:11]i009: Command Line: '"-burn.clean.room=C:\temp\SQL Setup.exe"'
[0684:0A34][2016-02-02T15:20:11]i000: Setting string variable 'WixBundleOriginalSource' to value 'C:\temp\SQL Setup.exe'
[0684:0A34][2016-02-02T15:20:11]i000: Setting string variable 'WixBundleOriginalSourceFolder' to value 'C:\temp\'
[0684:0A34][2016-02-02T15:20:11]i000: Setting string variable 'WixBundleLog' to value 'C:\Users\ADMINI~1\AppData\Local\Temp\SQL_Server_20160202152011.log'
[0684:0A34][2016-02-02T15:20:11]i000: Setting string variable 'WixBundleManufacturer' to value 'Sample Company'
[0684:0A34][2016-02-02T15:20:11]i000: Loading managed bootstrapper application.
[0684:0A34][2016-02-02T15:20:12]i000: Creating BA thread to run asynchronously.
[0684:0A34][2016-02-02T15:20:12]i100: Detect begin, 3 packages
[0684:0A34][2016-02-02T15:20:12]i000: Setting string variable 'NETFRAMEWORK45' to value '379893'
[0684:0A34][2016-02-02T15:20:12]i000: Registry key not found. Key = 'SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL'
[0684:0A34][2016-02-02T15:20:12]i000: Setting numeric variable 'SqlInstanceKeyFound' to value 0
[0684:0A34][2016-02-02T15:20:12]i052: Condition 'SqlInstanceKeyFound' evaluates to false.
[0684:0A34][2016-02-02T15:20:12]i052: Condition 'SqlInstanceKeyFound' evaluates to false.
[0684:0A34][2016-02-02T15:20:12]i052: Condition 'SqlInstanceFound' evaluates to false.
[0684:0A34][2016-02-02T15:20:12]i052: Condition 'NETFRAMEWORK45 >= 379893' evaluates to true.
[0684:0A34][2016-02-02T15:20:12]i052: Condition 'SqlInstanceFound' evaluates to false.
[0684:0A34][2016-02-02T15:20:12]i052: Condition 'SqlInstanceFound' evaluates to false.
[0684:0A34][2016-02-02T15:20:12]i101: Detected package: NetFx452Web, state: Present, cached: Complete
[0684:0A34][2016-02-02T15:20:12]i101: Detected package: SQLServer2014SP1_32bit, state: Absent, cached: None
[0684:0A34][2016-02-02T15:20:12]i101: Detected package: SQLServer2014SP1_64bit, state: Absent, cached: None
[0684:0A34][2016-02-02T15:20:12]i199: Detect complete, result: 0x0
[0684:0A34][2016-02-02T15:20:15]i200: Plan begin, 3 packages, action: Install
[0684:0A34][2016-02-02T15:20:15]w321: Skipping dependency registration on package with no dependency providers: NetFx452Web
[0684:0A34][2016-02-02T15:20:15]i052: Condition 'NOT VersionNT64' evaluates to false.
[0684:0A34][2016-02-02T15:20:15]w321: Skipping dependency registration on package with no dependency providers: SQLServer2014SP1_32bit
[0684:0A34][2016-02-02T15:20:15]i052: Condition 'VersionNT64' evaluates to true.
[0684:0A34][2016-02-02T15:20:15]w321: Skipping dependency registration on package with no dependency providers: SQLServer2014SP1_64bit
[0684:0A34][2016-02-02T15:20:15]i000: Setting string variable 'WixBundleLog_SQLServer2014SP1_64bit' to value 'C:\Users\ADMINI~1\AppData\Local\Temp\SQL_Server_20160202152011_000_SQLServer2014SP1_64bit.log'
[0684:0A34][2016-02-02T15:20:15]i000: Setting string variable 'WixBundleRollbackLog_SQLServer2014SP1_64bit' to value 'C:\Users\ADMINI~1\AppData\Local\Temp\SQL_Server_20160202152011_000_SQLServer2014SP1_64bit_rollback.log'
[0684:0A34][2016-02-02T15:20:15]i201: Planned package: NetFx452Web, state: Present, default requested: Present, ba requested: Present, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[0684:0A34][2016-02-02T15:20:15]i201: Planned package: SQLServer2014SP1_32bit, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[0684:0A34][2016-02-02T15:20:15]i201: Planned package: SQLServer2014SP1_64bit, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: Yes, uncache: No, dependency: None
[0684:0A34][2016-02-02T15:20:15]i299: Plan complete, result: 0x0
[0684:0A34][2016-02-02T15:20:15]i300: Apply begin
[0684:0A34][2016-02-02T15:20:15]i010: Launching elevated engine process.
[0684:0A34][2016-02-02T15:20:15]i011: Launched elevated engine process.
[0684:0A34][2016-02-02T15:20:15]i012: Connected to elevated engine.
[0BC8:0810][2016-02-02T15:20:15]i358: Pausing automatic updates.
[0BC8:0810][2016-02-02T15:20:18]i359: Paused automatic updates.
[0BC8:0810][2016-02-02T15:20:18]i360: Creating a system restore point.
[0BC8:0810][2016-02-02T15:20:18]i362: System restore disabled, system restore point not created.
[0BC8:0810][2016-02-02T15:20:18]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{62333823-3122-40b6-a202-6f914a23324c}, resume: Active, restart initiated: No, disable resume: No
[0684:0628][2016-02-02T15:20:18]i338: Acquiring package: SQLServer2014SP1_64bit, payload: SQLServer2014SP1_64bit, copy from: C:\temp\Setups\SQLEXPRWT_x64_DEU.exe
[0684:0628][2016-02-02T15:20:27]i000: Setting string variable 'WixBundleLastUsedSource' to value 'C:\temp\'
[0BC8:0B80][2016-02-02T15:20:37]i305: Verified acquired payload: SQLServer2014SP1_64bit at path: C:\ProgramData\Package Cache\.unverified\SQLServer2014SP1_64bit, moving to: C:\ProgramData\Package Cache\9D828C6F6D284BA117AA80D89FEE94756F39DE4F\Setups\SQLEXPRWT_x64_DEU.exe.
[0BC8:0810][2016-02-02T15:20:37]i301: Applying execute package: SQLServer2014SP1_64bit, action: Install, path: C:\ProgramData\Package Cache\9D828C6F6D284BA117AA80D89FEE94756F39DE4F\Setups\SQLEXPRWT_x64_DEU.exe, arguments: '"C:\ProgramData\Package Cache\9D828C6F6D284BA117AA80D89FEE94756F39DE4F\Setups\SQLEXPRWT_x64_DEU.exe" /ACTION=Install /Q /FEATURES=SQLENGINE,CONN,SSMS,SNAC_SDK /INSTANCENAME=SQLEXPRESS /SQLSYSADMINACCOUNTS=BUILTIN\Administrators /BROWSERSVCSTARTUPTYPE=Automatic /TCPENABLED=1 /NPENABLED=1 /IACCEPTSQLSERVERLICENSETERMS /HIDECONSOLE'
[0BC8:0810][2016-02-02T15:23:00]e000: Error 0x80070642: Bootstrapper application aborted during EXE progress.
[0BC8:0810][2016-02-02T15:23:00]e000: Error 0x80070642: Failed to execute EXE package.
[0684:0A34][2016-02-02T15:23:00]e000: Error 0x80070642: Failed to configure per-machine EXE package.
[0684:0A34][2016-02-02T15:23:00]i319: Applied execute package: SQLServer2014SP1_64bit, result: 0x80070642, restart: None
[0684:0A34][2016-02-02T15:23:00]e000: Error 0x80070642: Failed to execute EXE package.
[0BC8:0810][2016-02-02T15:23:00]i351: Removing cached package: SQLServer2014SP1_64bit, from path: C:\ProgramData\Package Cache\9D828C6F6D284BA117AA80D89FEE94756F39DE4F\
[0BC8:0810][2016-02-02T15:23:06]w353: Unable to remove cached package: SQLServer2014SP1_64bit, from path: C:\ProgramData\Package Cache\9D828C6F6D284BA117AA80D89FEE94756F39DE4F\, reason: 0x80070091. Continuing...
[0BC8:0810][2016-02-02T15:23:06]i372: Session end, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{62333823-3122-40b6-a202-6f914a23324c}, resume: None, restart: None, disable resume: No
[0BC8:0810][2016-02-02T15:23:06]i330: Removed bundle dependency provider: {62333823-3122-40b6-a202-6f914a23324c}
[0BC8:0810][2016-02-02T15:23:06]i352: Removing cached bundle: {62333823-3122-40b6-a202-6f914a23324c}, from path: C:\ProgramData\Package Cache\{62333823-3122-40b6-a202-6f914a23324c}\
[0BC8:0810][2016-02-02T15:23:06]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{62333823-3122-40b6-a202-6f914a23324c}, resume: None, restart initiated: No, disable resume: No
[0684:0A34][2016-02-02T15:23:06]i399: Apply complete, result: 0x80070642, restart: None, ba requested restart:  No
[0684:0A34][2016-02-02T15:23:09]i500: Shutting down, exit code: 0x642
[0684:0A34][2016-02-02T15:23:09]i410: Variable: NETFRAMEWORK45 = 379893
[0684:0A34][2016-02-02T15:23:09]i410: Variable: SqlInstanceKeyFound = 0
[0684:0A34][2016-02-02T15:23:09]i410: Variable: VersionNT64 = 6.2.0.0
[0684:0A34][2016-02-02T15:23:09]i410: Variable: WixBundleAction = 5
[0684:0A34][2016-02-02T15:23:09]i410: Variable: WixBundleElevated = 1
[0684:0A34][2016-02-02T15:23:09]i410: Variable: WixBundleLastUsedSource = C:\temp\
[0684:0A34][2016-02-02T15:23:09]i410: Variable: WixBundleLog = C:\Users\ADMINI~1\AppData\Local\Temp\SQL_Server_20160202152011.log
[0684:0A34][2016-02-02T15:23:09]i410: Variable: WixBundleLog_SQLServer2014SP1_64bit = C:\Users\ADMINI~1\AppData\Local\Temp\SQL_Server_20160202152011_000_SQLServer2014SP1_64bit.log
[0684:0A34][2016-02-02T15:23:09]i410: Variable: WixBundleManufacturer = Sample Company
[0684:0A34][2016-02-02T15:23:09]i410: Variable: WixBundleName = SQL Server
[0684:0A34][2016-02-02T15:23:09]i410: Variable: WixBundleOriginalSource = C:\Temp\SQL Setup.exe
[0684:0A34][2016-02-02T15:23:09]i410: Variable: WixBundleOriginalSourceFolder = C:\Temp\
[0684:0A34][2016-02-02T15:23:09]i410: Variable: WixBundleProviderKey = {62333823-3122-40b6-a202-6f914a23324c}
[0684:0A34][2016-02-02T15:23:09]i410: Variable: WixBundleRollbackLog_SQLServer2014SP1_64bit = C:\Users\ADMINI~1\AppData\Local\Temp\SQL_Server_20160202152011_000_SQLServer2014SP1_64bit_rollback.log
[0684:0A34][2016-02-02T15:23:09]i410: Variable: WixBundleSourceProcessFolder = C:\temp\
[0684:0A34][2016-02-02T15:23:09]i410: Variable: WixBundleSourceProcessPath = C:\temp\SQL Setup.exe
[0684:0A34][2016-02-02T15:23:09]i410: Variable: WixBundleTag = 
[0684:0A34][2016-02-02T15:23:09]i410: Variable: WixBundleVersion = 1.0.0.0
[0684:0A34][2016-02-02T15:23:09]i007: Exit code: 0x642, restarting: No

1 个答案:

答案 0 :(得分:1)

Permanent=yes表示Burn永远不会卸载该软件包。