Merge pull request #5940 from Icinga/fix/chocolatey

Remove deprecated Chocolatey functions
This commit is contained in:
Gunnar Beutner 2018-01-15 11:36:54 +01:00 committed by GitHub
commit ab1a2bffcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,6 @@ $fileType = 'msi';
$silentArgs = '/qr /norestart'
$validExitCodes = @(0)
try {
$packageGuid = Get-ChildItem HKLM:\SOFTWARE\Classes\Installer\Products |
Get-ItemProperty -Name 'ProductName' |
? { $_.ProductName -like $packageName + "*"} |
@ -19,10 +18,3 @@ try {
# Use this instead
$msiArgs = "/x $file $silentArgs";
Start-ChocolateyProcessAsAdmin "$msiArgs" 'msiexec' -validExitCodes $validExitCodes
Write-ChocolateySuccess $package
}
catch {
Write-ChocolateyFailure $package "$($_.Exception.Message)"
throw
}