我正在执行以下代码以静默方式安装SQL Server 2012。安装成功,但即使在安装程序gui中显示“Uninstall successfull”,也不会发生SQL Server的卸载。我
我从命令行执行了uninstall命令,它正确地卸载了SQL服务器。
<Chain>
<ExePackage PerMachine="yes"
Cache="yes"
SourceFile="SQLEXPR_x64_ENU.exe"
DisplayName="SQLServerExpress"
InstallCommand="/Q /IACCEPTSQLSERVERLICENSETERMS /ACTION=install /FEATURES=SQLEngine /INSTANCENAME=MSSQLSERVER /SAPWD=database /SECURITYMODE=SQL /BROWSERSVCSTARTUPTYPE=Automatic"
RepairCommand="/Q /ACTION=Repair /FEATURES=SQLEngine /INSTANCENAME=MSSQLSERVER /HIDECONSOLE"
UninstallCommand="/Q /ACTION=Uninstall /FEATURES=SQLEngine /INSTANCENAME=MSSQLSERVER /HIDECONSOLE"
Description="Installs SQL Server Express 2012 silently"
Vital="yes" >
<ExitCode Behavior="success" Value="0"/>
</ExePackage>
</Chain>
我需要创建另一个MSI并将其添加到上面的链中,该链将在安装SQL Server 2012之后创建一些数据库模式(待完成)。如果我遗漏了任何东西,请告诉我。
卸载日志
[0EC4:0328][2012-06-13T11:04:20]: Burn v3.6.3013.0, Windows v6.1 (Build 7601: Service Pack 1), path: C:\Users\Admin\Desktop\DemoBootstrapper.exe, cmdline: '/uninstall /log uninstall.log -burn.unelevated BurnPipe.{EC3D39B1-3C1A-459A-B28A-D802799C0481} {DF47D5D9-E434-45B3-B417-0CFEB8B33682} 2632'
[0EC4:0328][2012-06-13T11:04:20]: Setting string variable 'WixBundleLog' to value 'C:\Users\Admin\Desktop\uninstall.log'
[0EC4:0328][2012-06-13T11:04:20]: Setting string variable 'WixBundleOriginalSource' to value 'C:\Users\Admin\Desktop\DemoBootstrapper.exe'
[0EC4:0328][2012-06-13T11:04:21]: Detect 1 packages
[0EC4:0328][2012-06-13T11:04:21]: Detected package: SQLEXPR_x64_ENU.exe, state: Absent, cached: Complete
[0EC4:0328][2012-06-13T11:04:21]: Detect complete, result: 0x0
[0EC4:0328][2012-06-13T11:04:23]: Plan 1 packages, action: Uninstall
[0EC4:0328][2012-06-13T11:04:23]: Skipping dependency registration on package with no dependency providers: SQLEXPR_x64_ENU.exe
[0EC4:0328][2012-06-13T11:04:23]: Planned package: SQLEXPR_x64_ENU.exe, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: Yes, dependency: None
[0EC4:0328][2012-06-13T11:04:23]: Plan complete, result: 0x0
[0EC4:0328][2012-06-13T11:04:23]: Apply begin
[0A48:0FA8][2012-06-13T11:04:23]: Creating a system restore point.
[0A48:0FA8][2012-06-13T11:04:30]: Created a system restore point.
[0A48:0FA8][2012-06-13T11:04:30]: Removing cached package: SQLEXPR_x64_ENU.exe, from path: C:\ProgramData\Package Cache\E4561D5CAA761A5D1DAA0D305F4FECEDC6A0D39C\
[0A48:0FA8][2012-06-13T11:04:30]: Removed bundle dependency provider: {b18c55d0-824f-4d9b-93ed-71907b83ceb0}
[0A48:0FA8][2012-06-13T11:04:30]: Removing cached bundle: {b18c55d0-824f-4d9b-93ed-71907b83ceb0}, from path: C:\ProgramData\Package Cache\{b18c55d0-824f-4d9b-93ed-71907b83ceb0}\
[0EC4:0328][2012-06-13T11:04:30]: Apply complete, result: 0x0, restart: None, ba requested restart: No
[0EC4:0328][2012-06-13T11:04:32]: Shutting down, exit code: 0x0
[0EC4:0328][2012-06-13T11:04:32]: Variable: WixBundleAction = 3
[0EC4:0328][2012-06-13T11:04:32]: Variable: WixBundleElevated = 1
[0EC4:0328][2012-06-13T11:04:32]: Variable: WixBundleInstalled = 1
[0EC4:0328][2012-06-13T11:04:32]: Variable: WixBundleLog = C:\Users\Admin\Desktop\uninstall.log
[0EC4:0328][2012-06-13T11:04:32]: Variable: WixBundleName = Demo Kit
[0EC4:0328][2012-06-13T11:04:32]: Variable: WixBundleOriginalSource = C:\Users\Admin\Desktop\DemoBootstrapper.exe
[0EC4:0328][2012-06-13T11:04:32]: Variable: WixBundleProviderKey = {b18c55d0-824f-4d9b-93ed-71907b83ceb0}
[0EC4:0328][2012-06-13T11:04:32]: Variable: WixBundleTag =
[0EC4:0328][2012-06-13T11:04:32]: Variable: WixBundleVersion = 1.0.0.0
[0EC4:0328][2012-06-13T11:04:33]: Exit code: 0x0, restarting: No
答案 0 :(得分:3)
你需要提供一个DetectCondition,以便Burn可以找到安装的SQL;否则,它认为它是“缺席”并且不会尝试卸载它。