2018-02-08 14:48:36 +01:00
|
|
|
# Joplin Notes and To-Do
|
|
|
|
# 2018 foo.li systeme + software
|
|
|
|
|
|
|
|
$packageName = 'joplin'
|
|
|
|
$packageSearch = 'Joplin*'
|
|
|
|
$installerType = 'exe'
|
|
|
|
$silentArgs = '/ALLUSERS=1 /S'
|
2018-02-20 00:40:02 +01:00
|
|
|
$version = '1.0.67'
|
2018-02-08 14:48:36 +01:00
|
|
|
$url = 'https://github.com/laurent22/joplin/releases/download/v' + $version + '/Joplin-Setup-' + $version + '.exe'
|
|
|
|
$url64 = $url
|
2018-02-20 00:40:02 +01:00
|
|
|
$checksum = '4436067062695DFDD8E553117EDD8A438D91FF7D'
|
2018-02-08 14:48:36 +01:00
|
|
|
$checksumType = 'sha1'
|
|
|
|
$checksum64 = $checksum
|
|
|
|
$checksumType64 = $checksumType
|
|
|
|
|
|
|
|
try {
|
|
|
|
$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 $(
|
|
|
|
'Joplin ' + $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
|
|
|
|
}
|
|
|
|
} catch {
|
|
|
|
throw $_.Exception
|
|
|
|
}
|