Files
ChocolateyPackages/SQL2008.ClrTypes/tools/chocolateyInstall.ps1
Iristyle 5a73b326ee Force installing both x86 and x64 on x64 OS
Both sets of Clr types are needed by dependendencies such as SMO
2012-10-12 19:15:38 -04:00

30 lines
819 B
PowerShell

$package = 'SQL2008.ClrTypes'
try {
$params = @{
packageName = $package;
fileType = 'msi';
silentArgs = '/quiet';
url = 'http://go.microsoft.com/fwlink/?LinkId=123721&clcid=0x409';
url64bit = 'http://go.microsoft.com/fwlink/?LinkId=123722&clcid=0x409';
}
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
}