feat: SQL2008R2.CmdLine 10.50.1600.0

- 10.50.1600.1 because zippy1981 bungled the pushed packages
This commit is contained in:
Justin Dearing
2013-01-17 05:22:32 -05:00
committed by Iristyle
parent e9e46a9ff0
commit 2833729373
3 changed files with 82 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
$package = 'SQL2008R2.CmdLine'
try {
$params = @{
packageName = $package;
fileType = 'msi';
silentArgs = '/quiet';
url = 'http://download.microsoft.com/download/B/6/3/B63CAC7F-44BB-41FA-92A3-CBF71360F022/1033/x86/SqlCmdLnUtils.msi';
url64bit = 'http://download.microsoft.com/download/B/6/3/B63CAC7F-44BB-41FA-92A3-CBF71360F022/1033/x64/SqlCmdLnUtils.msi';
}
Install-ChocolateyPackage @params
# install both x86 and x64 editions since x64 supports both
$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
}

View File

@@ -0,0 +1,26 @@
# HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\
$msiId = '{5AA08D9F-3BE3-4A34-B53E-858A1895589E}'
$msiId64 = '{D9F711D3-3C90-4D79-9292-47C90C722E2A}'
$package = 'SQL2008R2.CmdLine'
$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
}