From 232d54a9cf8991ca93e993d21e115b4b5a0ef6ca Mon Sep 17 00:00:00 2001 From: Iristyle Date: Tue, 23 Jul 2013 20:41:26 -0400 Subject: [PATCH] feat: SQL2008.ClrTypes uninstaller / bump ver --- SQL2008.ClrTypes/SQL2008.ClrTypes.nuspec | 2 +- .../tools/chocolateyUninstall.ps1 | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 SQL2008.ClrTypes/tools/chocolateyUninstall.ps1 diff --git a/SQL2008.ClrTypes/SQL2008.ClrTypes.nuspec b/SQL2008.ClrTypes/SQL2008.ClrTypes.nuspec index 661bc08..a39d953 100644 --- a/SQL2008.ClrTypes/SQL2008.ClrTypes.nuspec +++ b/SQL2008.ClrTypes/SQL2008.ClrTypes.nuspec @@ -3,7 +3,7 @@ SQL2008.ClrTypes Microsoft SQL Server 2008 System CLR Types - 10.00.2531.00 + 10.00.2531.01 Microsoft Ethan Brown Microsoft SQL Server 2008 Feature Pack, April 2009 diff --git a/SQL2008.ClrTypes/tools/chocolateyUninstall.ps1 b/SQL2008.ClrTypes/tools/chocolateyUninstall.ps1 new file mode 100644 index 0000000..9e99e66 --- /dev/null +++ b/SQL2008.ClrTypes/tools/chocolateyUninstall.ps1 @@ -0,0 +1,26 @@ +# HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\ +$msiId = '{C9FD9DF2-D92B-4321-A338-52961FECE249}' +$msiId64 = '{2D766E70-7670-41A8-B370-1E09084ABA5D}' + +$package = 'SQL2008.ClrTypes' + +$IsSystem32Bit = (($Env:PROCESSOR_ARCHITECTURE -eq 'x86') -and ($Env:PROCESSOR_ARCHITEW6432 -eq $null)) + +try { + + $uninstallParams = @{ + PackageName = $package; + FileType = 'MSI'; + SilentArgs = "$msiId /qb"; + ValidExitCodes = @(0) + } + + if ($IsSystem32Bit) { $uninstallParams.SilentArgs = "$msiId64 /qb" } + + Uninstall-ChocolateyPackage + + Write-ChocolateySuccess $package +} catch { + Write-ChocolateyFailure $package "$($_.Exception.Message)" + throw +}