From 9137d9f7778e13144dd3e6ee24c5790bbfff7f12 Mon Sep 17 00:00:00 2001 From: Iristyle Date: Tue, 23 Jul 2013 20:50:27 -0400 Subject: [PATCH] feat: SQL2008R2.ClrTypes 10.50.1600.0 - 10.50.1600.1 because zippy1981 bungled the pushed packages --- SQL2008R2.ClrTypes/SQL2008R2.ClrTypes.nuspec | 25 ++++++++++++++++ .../tools/chocolateyInstall.ps1 | 29 +++++++++++++++++++ .../tools/chocolateyUninstall.ps1 | 26 +++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 SQL2008R2.ClrTypes/SQL2008R2.ClrTypes.nuspec create mode 100644 SQL2008R2.ClrTypes/tools/chocolateyInstall.ps1 create mode 100644 SQL2008R2.ClrTypes/tools/chocolateyUninstall.ps1 diff --git a/SQL2008R2.ClrTypes/SQL2008R2.ClrTypes.nuspec b/SQL2008R2.ClrTypes/SQL2008R2.ClrTypes.nuspec new file mode 100644 index 0000000..8dd3c72 --- /dev/null +++ b/SQL2008R2.ClrTypes/SQL2008R2.ClrTypes.nuspec @@ -0,0 +1,25 @@ + + + + SQL2008R2.ClrTypes + Microsoft SQL Server 2008 R2 System CLR Types + 10.50.1600.1 + Microsoft + zippy1981 + Microsoft SQL Server 2008R2 Feature Pack, October 2011 + + The SQL Server System CLR Types package contains the components implementing the geometry, geography, and hierarchy id types in SQL Server 2008 R2. This component can be installed separately from the server to allow client applications to use these types outside of the server. + The SQL Server System CLR Types package contains the components implementing the geometry, geography, and hierarchy id types in SQL Server 2008 R2. This component can be installed separately from the server to allow client applications to use these types outside of the server. + http://www.microsoft.com/en-us/download/details.aspx?id=16978 + SQL SQL2008R2 .NET CLR + + false + https://github.com/Iristyle/ChocolateyPackages/raw/master/SQL2008.SMO/SQL2008.png + + + + + + diff --git a/SQL2008R2.ClrTypes/tools/chocolateyInstall.ps1 b/SQL2008R2.ClrTypes/tools/chocolateyInstall.ps1 new file mode 100644 index 0000000..88ee83e --- /dev/null +++ b/SQL2008R2.ClrTypes/tools/chocolateyInstall.ps1 @@ -0,0 +1,29 @@ +$package = 'SQL2008R2.ClrTypes' + +try { + $params = @{ + packageName = $package; + fileType = 'msi'; + silentArgs = '/quiet'; + url = 'http://download.microsoft.com/download/B/6/3/B63CAC7F-44BB-41FA-92A3-CBF71360F022/1033/x86/SQLSysClrTypes.msi'; + url64bit = 'http://download.microsoft.com/download/B/6/3/B63CAC7F-44BB-41FA-92A3-CBF71360F022/1033/x64/SQLSysClrTypes.msi'; + } + + Install-ChocolateyPackage @params + + # http://forums.iis.net/p/1174672/1968094.aspx + # it turns out that even on x64, x86 clr types should also be installed + # or SMO breaks + $IsSytem32Bit = (($Env:PROCESSOR_ARCHITECTURE -eq 'x86') -and ` + ($Env:PROCESSOR_ARCHITEW6432 -eq $null)) + if (!$IsSytem32Bit) + { + $params.url64bit = $params.url + Install-ChocolateyPackage @params + } + + Write-ChocolateySuccess $package +} catch { + Write-ChocolateyFailure $package "$($_.Exception.Message)" + throw +} diff --git a/SQL2008R2.ClrTypes/tools/chocolateyUninstall.ps1 b/SQL2008R2.ClrTypes/tools/chocolateyUninstall.ps1 new file mode 100644 index 0000000..b6e5f5a --- /dev/null +++ b/SQL2008R2.ClrTypes/tools/chocolateyUninstall.ps1 @@ -0,0 +1,26 @@ +# HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\ +$msiId = '{A47FD1BF-A815-4A76-BE65-53A15BD5D25D}' +$msiId64 = '{4701DEDE-1888-49E0-BAE5-857875924CA2}' + +$package = 'SQL2008R2.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 +}