I am executing the following code to install SQL Server 2012 in silent mode. The installation succeeds, but the uninstallation for SQL Server is not happening even though it shows “Uninstall successfull” in the installer gui. I
I executed the uninstall command from the command line and it uninstalls SQL server properly.
<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>
I need to create another MSI and add it to the above chain that will create some database schema after SQL Server 2012 is installed (to be done). Please let me know if I am missing anything.
Uninstall Log
[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
You need to supply a DetectCondition so Burn can find out that SQL is installed; otherwise, it thinks it’s “Absent” and won’t try to uninstall it.