feat: SQL2008.PowerShell uninstaller / bump ver

This commit is contained in:
Iristyle
2013-07-23 20:46:29 -04:00
parent 898f8dee5b
commit f397666cca
3 changed files with 29 additions and 6 deletions

View File

@@ -1,9 +1,9 @@
<?xml version="1.0"?>
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<metadata>
<id>SQL2008.Powershell</id>
<id>SQL2008.PowerShell</id>
<title>Microsoft Windows PowerShell Extensions for SQL Server</title>
<version>10.00.2531.00</version>
<version>10.00.2531.01</version>
<authors>Microsoft</authors>
<owners>Ethan Brown</owners>
<summary>Microsoft SQL Server 2008 Feature Pack, April 2009
@@ -24,9 +24,6 @@
<releaseNotes></releaseNotes>
<dependencies>
<dependency id="SQL2008.SMO" />
<!-- can't run choc without powershell!
<dependency id="powershell" />
-->
</dependencies>
</metadata>
<files>

View File

@@ -1,4 +1,4 @@
$package = 'SQL2008.Powershell'
$package = 'SQL2008.PowerShell'
try {
$params = @{

View File

@@ -0,0 +1,26 @@
# HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\
$msiId = '{4033FB91-32C7-440D-B4A3-B76D47190233}'
$msiId64 = '{A2D06441-583D-4D37-9A9A-E4AE1663A81E}'
$package = 'SQL2008.PowerShell'
$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
}