2017-08-01 21:42:32 +02:00
|
|
|
# Kopano DeskApp
|
2019-01-27 00:07:06 +01:00
|
|
|
# 2017-2019 foo.li systeme + software
|
2017-08-01 21:42:32 +02:00
|
|
|
# https://www.gnu.org/licenses/gpl.txt
|
|
|
|
|
|
|
|
$packageName = 'kopano-deskapp-nightly'
|
|
|
|
$packageSearch = 'Kopano DeskApp'
|
|
|
|
$installerType = 'msi'
|
|
|
|
$silentArgs = '/qb'
|
2019-04-20 15:53:32 +02:00
|
|
|
$version = '2.2.1'
|
2017-08-01 21:42:32 +02:00
|
|
|
$url = 'https://download.kopano.io/community/deskapp:/Windows/kopano-deskapp-' + $version + '-x86.msi'
|
|
|
|
$url64 = 'https://download.kopano.io/community/deskapp:/Windows/kopano-deskapp-' + $version + '-x64.msi'
|
2019-04-20 15:53:32 +02:00
|
|
|
$checksum = '6e6e9135a8646c72bcf34bbb193a8ab09689cacb'
|
2017-08-01 21:42:32 +02:00
|
|
|
$checksumType = 'sha1'
|
2019-04-20 15:53:32 +02:00
|
|
|
$checksum64 = 'fc9759881ded742d41fc47f5f5a3b234d5cec068'
|
2017-08-01 21:42:32 +02:00
|
|
|
$checksumType64 = $checksumType
|
|
|
|
|
2019-01-27 00:07:06 +01:00
|
|
|
try {
|
2017-08-01 21:42:32 +02:00
|
|
|
$app = Get-ItemProperty -Path @('HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*',
|
|
|
|
'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*') `
|
|
|
|
-ErrorAction:SilentlyContinue | Where-Object { $_.DisplayName -like $packageSearch }
|
|
|
|
|
|
|
|
if ($app -and ([version]$app.DisplayVersion -ge [version]$version)) {
|
|
|
|
Write-Output $(
|
|
|
|
'Kopano DeskApp ' + $version + ' or greater is already installed. ' +
|
|
|
|
'No need to download and install again. Otherwise uninstall first.'
|
|
|
|
)
|
|
|
|
} else {
|
|
|
|
Install-ChocolateyPackage $packageName $installerType $silentArgs $url $url64 `
|
|
|
|
-checksum $checksum -checksumType $checksumType `
|
|
|
|
-checksum64 $checksum64 -checksumType64 $checksumType64
|
2019-01-27 00:07:06 +01:00
|
|
|
}
|
2017-08-01 21:42:32 +02:00
|
|
|
} catch {
|
|
|
|
throw $_.Exception
|
2017-08-03 02:25:53 +02:00
|
|
|
}
|