Install both SMO x86 and x64 on x64 OSes

SQL Powershell utils, which run on x86 and x64, require that the
matching SMO be installed :(
This commit is contained in:
Iristyle
2012-10-13 13:00:17 -04:00
parent 0e88769424
commit 80fb102d92
2 changed files with 14 additions and 2 deletions

View File

@@ -3,10 +3,12 @@
<metadata> <metadata>
<id>SQL2008.SMO</id> <id>SQL2008.SMO</id>
<title>Microsoft SQL Server 2008 Management Objects</title> <title>Microsoft SQL Server 2008 Management Objects</title>
<version>10.00.2531.00</version> <version>10.00.2531.01</version>
<authors>Microsoft</authors> <authors>Microsoft</authors>
<owners>Ethan Brown</owners> <owners>Ethan Brown</owners>
<summary>Microsoft SQL Server 2008 Feature Pack, April 2009 <summary>Microsoft SQL Server 2008 Feature Pack, April 2009 - 10.00.2531.00
Note that this is 10.00.2531.00, but had to be updated to 10.00.2531.01 to ensure that the dependent Powershell package would install correctly.
The SQL Server Management Objects (SMO) is a .NET Framework object model that enables software developers to create client-side applications to manage and administer SQL Server objects and services.</summary> The SQL Server Management Objects (SMO) is a .NET Framework object model that enables software developers to create client-side applications to manage and administer SQL Server objects and services.</summary>
<description>The SQL Server Management Objects (SMO) is a .NET Framework object model that enables software developers to create client-side applications to manage and administer SQL Server objects and services. This object model will work with SQL Server 2000, SQL Server 2005 and SQL Server 2008. <description>The SQL Server Management Objects (SMO) is a .NET Framework object model that enables software developers to create client-side applications to manage and administer SQL Server objects and services. This object model will work with SQL Server 2000, SQL Server 2005 and SQL Server 2008.

View File

@@ -11,6 +11,16 @@ try {
Install-ChocolateyPackage @params Install-ChocolateyPackage @params
# install both x86 and x64 editions of SMO since x64 supports both
# to install both variants of powershell, both variants of SMO must be present
$IsSytem32Bit = (($Env:PROCESSOR_ARCHITECTURE -eq 'x86') -and `
($Env:PROCESSOR_ARCHITEW6432 -eq $null))
if (!$IsSytem32Bit)
{
$params.url64bit = $params.url
Install-ChocolateyPackage @params
}
Write-ChocolateySuccess $package Write-ChocolateySuccess $package
} catch { } catch {
Write-ChocolateyFailure $package "$($_.Exception.Message)" Write-ChocolateyFailure $package "$($_.Exception.Message)"