feat: SQL2008.PowerShell uninstaller / bump ver
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>SQL2008.Powershell</id>
|
<id>SQL2008.PowerShell</id>
|
||||||
<title>Microsoft Windows PowerShell Extensions for SQL Server</title>
|
<title>Microsoft Windows PowerShell Extensions for SQL Server</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
|
||||||
@@ -24,9 +24,6 @@
|
|||||||
<releaseNotes></releaseNotes>
|
<releaseNotes></releaseNotes>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="SQL2008.SMO" />
|
<dependency id="SQL2008.SMO" />
|
||||||
<!-- can't run choc without powershell!
|
|
||||||
<dependency id="powershell" />
|
|
||||||
-->
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
$package = 'SQL2008.Powershell'
|
$package = 'SQL2008.PowerShell'
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$params = @{
|
$params = @{
|
||||||
|
26
SQL2008.Powershell/tools/chocolateyUninstall.ps1
Normal file
26
SQL2008.Powershell/tools/chocolateyUninstall.ps1
Normal 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
|
||||||
|
}
|
Reference in New Issue
Block a user