2017-10-08 16:45:25 +02:00
|
|
|
# KVM Virt Viewer for Windows
|
2022-04-26 11:51:13 +02:00
|
|
|
# 2011-2022 foo.li systeme + software
|
2017-10-08 16:45:25 +02:00
|
|
|
|
|
|
|
$packageName = 'virt-viewer'
|
2022-04-26 11:51:13 +02:00
|
|
|
$version = '11.0'
|
|
|
|
$installerver = '11.0-1.0'
|
|
|
|
$fullversion = '11.0.256'
|
2017-10-08 16:45:25 +02:00
|
|
|
$installerType = 'msi'
|
|
|
|
$silentArgs = '/qn /l*v ' + $env:Temp + '\virtviewer-setup.log'
|
|
|
|
$packageSearch = 'VirtViewer*'
|
|
|
|
$validExitCodes = @(0,3010)
|
2022-04-26 11:51:13 +02:00
|
|
|
$url = 'https://virt-manager.org/download/sources/virt-viewer/virt-viewer-x86-' + $installerver + '.msi'
|
|
|
|
$url64 = 'https://virt-manager.org/download/sources/virt-viewer/virt-viewer-x64-' + $installerver + '.msi'
|
|
|
|
$checksum = 'ac1e07d89eda6d53990e652076526292203f97d2'
|
2017-10-08 16:45:25 +02:00
|
|
|
$checksumType = 'sha1'
|
2022-04-26 11:51:13 +02:00
|
|
|
$checksum64 = '2c5427a86a00542efecbef73575c8db0996972d8'
|
2017-10-08 16:45:25 +02:00
|
|
|
$checksumType64 = $checksumType
|
|
|
|
|
|
|
|
try {
|
|
|
|
$app = Get-ItemProperty -Path @('HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*',
|
|
|
|
'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*',
|
|
|
|
'HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*' ) `
|
|
|
|
-ErrorAction:SilentlyContinue | Where-Object { $_.DisplayName -like $packageSearch }
|
|
|
|
if ($app -and ([version]$app.DisplayVersion -ge [version]$fullversion)) {
|
|
|
|
Write-Host $(
|
|
|
|
"Virt Viewer " + [version]$app.DisplayVersion + " is already installed.`r`n`a"
|
|
|
|
)
|
|
|
|
} else {
|
|
|
|
Install-ChocolateyPackage $packageName $installerType $silentArgs $url $url64 `
|
|
|
|
-checksum $checksum `
|
|
|
|
-checksumType $checksumType `
|
|
|
|
-checksum64 $checksum64 `
|
|
|
|
-checksumType64 $checksumType64 `
|
|
|
|
-validExitCodes $validExitCodes
|
|
|
|
}
|
|
|
|
} catch {
|
|
|
|
throw $_.Exception
|
|
|
|
}
|