OL Extension 1.6.246, non-retail/retail check office (buggy, will not be accepted from chocolatey)

This commit is contained in:
Peter V. Beck 2017-11-10 01:43:55 +01:00
parent b8616741d4
commit 3d9250c62e
2 changed files with 34 additions and 8 deletions

View File

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>kopano-ol-extension-nightly</id>
<version>1.5.239</version>
<version>1.6.246</version>
<title>Kopano Outlook Extension</title>
<authors>Kopano</authors>
<owners>foo.li systeme + software</owners>
@ -12,7 +12,7 @@
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<description>Kopano Outlook Extension (nightly)</description>
<summary>Kopano OL Extension Nightly (unsupported)</summary>
<releaseNotes>upgrade to 1.5.239 (27-09-2017)</releaseNotes>
<releaseNotes>upgrade to 1.6.246 (08-11-2017)</releaseNotes>
<copyright>2017 Kopano</copyright>
<language />
<tags>groupware kopano outlook-extension nightly</tags>

View File

@ -6,13 +6,13 @@ $packageName = 'kopano-ol-extension-nightly'
$packageSearch = 'Kopano OL Extension'
$installerType = 'msi'
$silentArgs = '/qb'
$version = '1.5.239'
$intvers = '1.5-239'
$version = '1.6.246'
$intvers = '1.6-246'
$url = 'https://download.kopano.io/community/olextension:/KopanoOLExtension-' + $intvers + '-32bit.msi'
$url64 = 'https://download.kopano.io/community/olextension:/KopanoOLExtension-' + $intvers + '-64bit.msi'
$checksum = '4B2280751803859E47FC738F1D82A1C92C263C42'
$checksum = '6F877FB2C693681F5E2002C5F9B365372A034C77'
$checksumType = 'sha1'
$checksum64 = 'AE4E083F83E78D7E045141ECE8E36DF9F0D18E55'
$checksum64 = '1CA137E458ADEB7241F33CBD82E42E44925A109A'
$checksumType64 = $checksumType
try {
@ -26,14 +26,40 @@ try {
"No need to download and install again. Otherwise uninstall first."
)
} else {
#check for outlook
#https://www.reddit.com/r/PowerShell/comments/47lhdt/simple_script_to_check_if_outlook_is_installed/
#if (Get-ItemProperty HKLM:\SOFTWARE\Classes\Outlook.Application -ErrorAction SilentlyContinue) {
# Write-Output "Outlook found"
#} else {
# Write-Output "Outlook could not be found"
# throw $_.Exception
#}
if (get-wmiobject Win32_Product |where {$_.Name -like "*Outlook*" -and $_.Version -ge "15"}) {
#works with non-retail...
Write-Output "Outlook 2013 (or higher) seems to be present"
Install-ChocolateyPackage $packageName $installerType $silentArgs $url $url64 `
-checksum $checksum -checksumType $checksumType `
-checksum64 $checksum64 -checksumType64 $checksumType64
} else {
Write-Output "unsupported (or no) Outlook Version detected"
throw $_.Exception
#works with retail versions...
$olkey = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\OUTLOOK.EXE'
$olpath = (Get-ItemProperty $olkey -ErrorAction SilentlyContinue).Path
if ($olpath) {
if (Test-Path $olpath) {
if ($olpath -like "*Office15*") { Write-Host -ForegroundColor DarkYellow "Outlook 2013 detected" }
if ($olpath -like "*Office16*") { Write-Host -ForegroundColor DarkYellow "Outlook 2016 detected" }
Write-Output "Outlook 2013 (or higher) seems to be present"
Install-ChocolateyPackage $packageName $installerType $silentArgs $url $url64 `
-checksum $checksum -checksumType $checksumType `
-checksum64 $checksum64 -checksumType64 $checksumType64
} else {
Write-Output "unsupported (or no) Outlook Version detected"
throw $_.Exception
}
} else {
Write-Output "unsupported (or no) Outlook Version detected"
throw $_.Exception
}
}
}
} catch {