Downloads:

54

Downloads of v 3.5.0:

31

Last Update:

29 Sep 2021

Package Maintainer(s):

Software Author(s):

  • Rookiestyle

Tags:

keepass plugin update

KeePass Plugin Early Update Check

  • 1
  • 2
  • 3

3.5.0 | Updated: 29 Sep 2021

Downloads:

54

Downloads of v 3.5.0:

31

Maintainer(s):

Software Author(s):

  • Rookiestyle

  • 1
  • 2
  • 3
KeePass Plugin Early Update Check 3.5.0

  • 1
  • 2
  • 3

This Package Contains an Exempted Check

Not All Tests Have Passed


Validation Testing Passed


Verification Testing Passed

Details

Scan Testing Exemption for this package version only:

Flagged as investigate as Package Scanner assumed there to be more files to scan than there actually was.

Details

Deployment Method: Individual Install, Upgrade, & Uninstall

To install KeePass Plugin Early Update Check, run the following command from the command line or from PowerShell:

>

To upgrade KeePass Plugin Early Update Check, run the following command from the command line or from PowerShell:

>

To uninstall KeePass Plugin Early Update Check, run the following command from the command line or from PowerShell:

>

Deployment Method:

📝 NOTE: This applies to both open source and commercial editions of Chocolatey.

1. Enter Your Internal Repository Url

(this should look similar to https://community.chocolatey.org/api/v2/)


2. Setup Your Environment

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

2. Get the package into your environment

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://community.chocolatey.org/api/v2/. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Copy Your Script

choco upgrade keepass-early-update-check -y --source="'INTERNAL REPO URL'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:


choco upgrade keepass-early-update-check -y --source="'INTERNAL REPO URL'" 
$exitCode = $LASTEXITCODE

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0
}

Exit $exitCode

- name: Install keepass-early-update-check
  win_chocolatey:
    name: keepass-early-update-check
    version: '3.5.0'
    source: INTERNAL REPO URL
    state: present

See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.


chocolatey_package 'keepass-early-update-check' do
  action    :install
  source   'INTERNAL REPO URL'
  version  '3.5.0'
end

See docs at https://docs.chef.io/resource_chocolatey_package.html.


cChocoPackageInstaller keepass-early-update-check
{
    Name     = "keepass-early-update-check"
    Version  = "3.5.0"
    Source   = "INTERNAL REPO URL"
}

Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.


package { 'keepass-early-update-check':
  ensure   => '3.5.0',
  provider => 'chocolatey',
  source   => 'INTERNAL REPO URL',
}

Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.


4. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

This package is exempt from moderation. While it is likely safe for you, there is more risk involved.
Description

KeePass Early Update Check is a plug-in for KeePass 2.x which lets you perform a KeePass update check BEFORE opening a database and automatically update plugins.


choco://keepass-early-update-check

To use choco:// protocol URLs, install (unofficial) choco:// Protocol support


PACKAGE NOTES


tools\chocolateyInstall.ps1
# Do not remove this test for UTF-8: if “Ω” doesn’t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one.
$ErrorActionPreference	= 'Stop';

$packageName		= $env:ChocolateyPackageName
$toolsDir		= "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$url			= 'https://github.com/Rookiestyle/EarlyUpdateCheck/releases/download/v3.5/EarlyUpdateCheck.plgx'
$url2			= 'https://raw.githubusercontent.com/Rookiestyle/EarlyUpdateCheck/master/ExternalPluginUpdates/ExternalPluginUpdates.xml'
$checksum		= '0539C5D76CDFD9D412BFE8EB71C79539BFDA03F119515B7611F481C77312B3F9'
$checksumType		= 'SHA256'
$checksum2		= 'B2A65101DF59AB784623A670D53E794374EAF06DF8E16359A4007091C63AF065'
$checksum2Type		= 'SHA256'
$sourcePluginsDir	= "$(Join-Path -Path $toolsDir -ChildPath Plugins)"
$KeePassPluginName	= 'EarlyUpdateCheck.plgx'
# This is the name of
# standard (e.g. downloaded) 'plugin configuration file'
$KeePassPluginCfgName	= "ExternalPluginUpdates.xml"
# This is the name of a 'plugin configuration addendum file(s)'
# (optionally found in the Keepass plugins directory)
# which should automatically be appended
# to the standard (e.g. downloaded) 'plugin configuration file'
$KeePassPluginCfg2Name	= 'AddExternalPluginUpdates-*.xml'
$sourceFileFullPath	= "$(Join-Path -Path $sourcePluginsDir -ChildPath $KeePassPluginName)"
$sourceFile2FullPath	= "$(Join-Path -Path $sourcePluginsDir -ChildPath $KeePassPluginCfgName)"
# This is the full path of a 'plugin configuration addendum file'
# (optionally found in the Tools directory)
# which should automatically be appended
# to the standard (e.g. downloaded) 'plugin configuration file'
$sourceFile3FullPath	= "$(Join-Path -Path $toolsDir -ChildPath $KeePassPluginCfg2Name)"

$helpers = @('helpers')
foreach ($helper in $helpers) {
	Write-Verbose "$($MyInvocation.MyCommand):Looking for helper script: $toolsDir\$helper.ps1"
	if ( ( Test-Path -Path "$toolsDir\$helper.ps1" ) ) {
		Write-Verbose "$($MyInvocation.MyCommand):Loading helper script: $toolsDir\$helper.ps1"
		. $toolsDir\$helper.ps1
	} else {
		Write-Error -Message "Helper script is not installed: $toolsDir\$helper.ps1" -ErrorAction Stop
	}
}

Get-ChocolateyWebFile -PackageName "$packageName" `
                      -Url $url -FileFullPath "$sourceFileFullPath" `
                      -Checksum "$checksum" -ChecksumType "$checksumType"

Get-ChocolateyWebFile -PackageName "$packageName" `
                      -Url $url2 -FileFullPath "$sourceFile2FullPath" `
                      -Checksum "$checksum2" -ChecksumType "$checksum2Type"

$packageSearch		= 'KeePass Password Safe*'
$KeePassPath		= ''

if ([array]$key = Get-UninstallRegistryKey -SoftwareName $packageSearch) {
  $KeePassPath = $key.InstallLocation
}

if ([string]::IsNullOrEmpty($KeePassPath)) {
  Write-Verbose "Cannot find '$packageSearch' in Add / Remove Programs or Programs and Features."
  Write-Verbose "Searching '$env:ChocolateyToolsLocation' for portable install..."
  $portPath = Join-Path -Path $env:ChocolateyToolsLocation -ChildPath "keepass"
  $KeePassPath = Get-ChildItem -Directory "$portPath*" -ErrorAction SilentlyContinue

  if ([string]::IsNullOrEmpty($KeePassPath)) {
    Write-Verbose "Searching '$env:Path' for unregistered install..."
    $installFullName = Get-Command -Name keepass -ErrorAction SilentlyContinue
    if ($installFullName) {
      $KeePassPath = Split-Path $installFullName.Path -Parent
    }
  }
}

if ([string]::IsNullOrEmpty($KeePassPath)) {
  Write-Error -Message 'Cannot find Keepass! Exiting now as it''s needed to install the plugin.' -ErrorAction Stop
}

Write-Host "Found Keepass install location at '$KeePassPath'."

$KeePassPluginPath	= 'Plugins'
$destPluginPath		= "$(Join-Path -Path $KeePassPath -ChildPath $KeePassPluginPath)"
$destFileFullPath	= "$(Join-Path -Path $destPluginPath -ChildPath $KeePassPluginName)"
$destFile2FullPath	= "$(Join-Path -Path $destPluginPath -ChildPath $KeePassPluginCfgName)"

$errorMessage		=
if (Test-Path $sourceFileFullPath) {
  if (Test-Path $sourceFile2FullPath) {
    if (Test-Path $destPluginPath) {
      Write-Host "Copying Keepass plugin file '$sourceFileFullPath'`n  to '$destFileFullPath'"
      Copy-Item -Path $sourceFileFullPath -Destination $destFileFullPath
      Set-File-KeePass-EarlyUpdate-Config -toolsDir $toolsDir -sourcePluginsDir $sourcePluginsDir -destPluginPath $destPluginPath
    } else {
      $errorMessage = 'Cannot find Keepass plugin destination!'
    }
  } else {
    $errorMessage = 'Cannot find Keepass plugin configuration file source!'
  }
} else {
    $errorMessage = 'Cannot find Keepass plugin source!'
}
if ($errorMessage) {
  Write-Error -Message "$errorMessage Exiting now as it's needed to install the plugin." -ErrorAction Stop
}

$processName		= 'KeePass'

if (Get-Process -Name $processName -ErrorAction SilentlyContinue) {
  Write-Warning "$processName is currently running.`n$($packageName) will be available at next restart."
} else {
  Write-Host "$($packageName) will be loaded the next time $processName is started."
}
tools\chocolateyUninstall.ps1
# Do not remove this test for UTF-8: if “Ω” doesn’t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one.
$ErrorActionPreference	= 'Stop';

$toolsDir		= "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"

$helpers = @('helpers')
foreach ($helper in $helpers) {
	Write-Verbose "$($MyInvocation.MyCommand):Looking for helper script: $toolsDir\$helper.ps1"
	if ( ( Test-Path -Path "$toolsDir\$helper.ps1" ) ) {
		Write-Verbose "$($MyInvocation.MyCommand):Loading helper script: $toolsDir\$helper.ps1"
		. $toolsDir\$helper.ps1
	} else {
		Write-Error -Message "Helper script is not installed: $toolsDir\$helper.ps1" -ErrorAction Stop
	}
}

$packageSearch		= 'KeePass Password Safe*'
$KeePassPath		= ''

if ([array]$key = Get-UninstallRegistryKey -SoftwareName $packageSearch) {
  $KeePassPath = $key.InstallLocation
}

if ([string]::IsNullOrEmpty($KeePassPath)) {
  Write-Verbose "Cannot find '$packageSearch' in Add / Remove Programs or Programs and Features."
  Write-Verbose "Searching '$env:ChocolateyToolsLocation' for portable install..."
  $portPath = Join-Path -Path $env:ChocolateyToolsLocation -ChildPath 'keepass'
  $KeePassPath = Get-ChildItem -Directory "$portPath*" -ErrorAction SilentlyContinue

  if ([string]::IsNullOrEmpty($KeePassPath)) {
    Write-Verbose "Searching '$env:Path' for unregistered install..."
    $installFullName = Get-Command -Name keepass -ErrorAction SilentlyContinue
    if ($installFullName) {
      $KeePassPath = Split-Path $installFullName.Path -Parent
    }
  }
}

if ([string]::IsNullOrEmpty($KeePassPath)) {
  Write-Error -Message 'Cannot find Keepass! Exiting now as it''s needed to remove the plugin.' -ErrorAction Stop
}

Write-Host "Found Keepass install location at '$KeePassPath'."

$KeePassPluginPath	= 'Plugins'
$KeePassPluginName	= 'EarlyUpdateCheck.plgx'
$KeePassPluginCfgName	= 'ExternalPluginUpdates.xml'
$destPluginPath		= "$(Join-Path -Path $KeePassPath -ChildPath $KeePassPluginPath)"
$destFileFullPath	= "$(Join-Path -Path $destPluginPath -ChildPath $KeePassPluginName)"
$destFile2FullPath	= "$(Join-Path -Path $destPluginPath -ChildPath $KeePassPluginCfgName)"

if (Test-Path $destFileFullPath) {
  Write-Host "Removing Keepass plugin file`n  from '$destFileFullPath'"
  Remove-Item -Path $destFileFullPath -Force
}

if (Test-Path $destFile2FullPath) {
  $destFile2FullPathTimestamped = (Get-FileName-Globbed -filename $destFile2FullPath)
  Write-Host "Removing Keepass plugin configuration file(s)`n  from '$destFile2FullPathTimestamped'"
  Remove-Item -Path $destFile2FullPathTimestamped -Force
}
tools\Get-FileName-Globbed.ps1
# Do not remove this test for UTF-8: if “Ω” doesn’t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one.
$ErrorActionPreference	= 'Stop';

function Get-FileName-Globbed() {
  [CmdletBinding()]
  param (
    [Parameter(Mandatory = $true)]
    [string]$filename,
    $globbed
  )

  begin {
    if ([string]::IsNullOrEmpty($globbed)) { $globbed = '*' }
    else {
      $timestampPrefix = '-t'
      if ($globbed -eq 'time') {
        $timestampFull = ( ( Get-Date -Format o ) -replace(':','') )
	$timezoneLength = '00:00'.Length
        $timestamp = $timestampPrefix + $timestampFull.split('.')[0]
        $timestamp += $timestamp + $timestampFull.substring(($timestampFull.Length - $timezoneLength),$timezoneLength)
      } else { $timestamp = $timestampPrefix + '*' }
      $globbed = $timestamp
    }
  }
  process {
    if ( $fileName -match('\.') ) { $sfx = '.' + $fileName.split('.')[-1] } else { $sfx = '' }
    $pfx = $fileName.Remove(($fileName.Length - $sfx.Length),$sfx.Length)
  }
  end {
    return "$pfx$globbed$sfx"
  }
}
tools\helpers.ps1
# Do not remove this test for UTF-8: if “Ω” doesn’t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one.
$ErrorActionPreference	= 'Stop';

if ( -not ( Test-Path -Path "$env:ProgramData\Chocolatey" ) ) {
	Write-Error -Message "Chocolatey is not installed" -ErrorAction Stop
}

$toolsPath = Split-Path $MyInvocation.MyCommand.Definition

$helpers = @('Get-FileName-Globbed','Set-File-KeePass-EarlyUpdate-Config')
foreach ($helper in $helpers) {
	Write-Verbose "$($MyInvocation.MyCommand):Looking for helper script: $toolsPath\$helper.ps1"
	if ( ( Test-Path -Path "$toolsPath\$helper.ps1" ) ) {
		Write-Verbose "$($MyInvocation.MyCommand):Loading helper script: $toolsPath\$helper.ps1"
		. $toolsPath\$helper.ps1
	} else {
		Write-Error -Message "Helper script is not installed: $toolsPath\$helper.ps1" -ErrorAction Stop
	}
}
tools\Set-File-KeePass-EarlyUpdate-Config.ps1
# Do not remove this test for UTF-8: if “Ω” doesn’t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one.
$ErrorActionPreference	= 'Stop';

function Set-File-KeePass-EarlyUpdate-Config() {
  [CmdletBinding()]
  param (
    [Parameter(Mandatory = $true)]
    [string]$toolsDir,
    [Parameter(Mandatory = $true)]
    [string]$sourcePluginsDir,
    [Parameter(Mandatory = $true)]
    [string]$destPluginPath
  )

  begin {
    # This is the name of
    # standard (e.g. downloaded) 'plugin configuration file'
    $KeePassPluginCfgName	= 'ExternalPluginUpdates.xml'
    # This is the name of a 'plugin configuration addendum file(s)'
    # (optionally found in the Keepass plugins directory)
    # which should automatically be appended
    # to the standard (e.g. downloaded) 'plugin configuration file'
    $KeePassPluginCfg2Name	= 'AddExternalPluginUpdates-*.xml'
    # This is the full path of
    # the standard (e.g. downloaded) 'plugin configuration file'
    # (found in the Tools directory)
    $sourceFile2FullPath	= "$(Join-Path -Path $sourcePluginsDir -ChildPath $KeePassPluginCfgName)"
    # This is the full path of a 'plugin configuration addendum file'
    # (optionally found in the Tools directory)
    # which should automatically be appended
    # to the standard (e.g. downloaded) 'plugin configuration file'
    $sourceFile3FullPath	= "$(Join-Path -Path $toolsDir -ChildPath $KeePassPluginCfg2Name)"
    # This is the full path to
    # the installed 'plugin configuration file'
    $destFile2FullPath		= "$(Join-Path -Path $destPluginPath -ChildPath $KeePassPluginCfgName)"
  }
  process {
    if (Test-Path $destPluginPath) {
       if (Test-Path $destFile2FullPath) {
           Write-Host "Found Keepass plugin configuration file`n  '$destFile2FullPath'"
           $destFile2FullPathTimestamped = (Get-FileName-Globbed -filename $destFile2FullPath -globbed 'time')
           Write-Host "Backing up KeePass plugin configuration file '$destFile2FullPath'`n   to (timestamped) file '$destFile2FullPathTimestamped'"
           Copy-Item -Path $destFile2FullPath -Destination $destFile2FullPathTimestamped -Force
       }
       Write-Host "Looking for Keepass plugin configuration addendum files`n  in '$destPluginPath\$KeePassPluginCfg2Name'"
       $addendumFiles = ( Get-ChildItem -Name -Path $destPluginPath -file $KeePassPluginCfg2Name )
       if ([string]::IsNullOrEmpty($addendumFiles)) {
           Write-Warning "Did not find (optional) Keepass plugin configuration addendum files`n  in '$destPluginPath\$KeePassPluginCfg2Name'"
           Write-Host "Copying Keepass plugin configuration file '$sourceFile2FullPath'`n  to '$destFile2FullPath'"
           Copy-Item -Path $sourceFile2FullPath -Destination $destFile2FullPath
       } else {
           Write-Host "Found [$($addendumFiles.Length)] Keepass plugin configuration addendum files`n  in '$destPluginPath\$KeePassPluginCfg2Name'`n"
           $addendumFiles | ForEach-Object {
              $sourceFile3FullPath = "$destPluginPath\$_"
              Write-Host "Found Keepass plugin configuration addendum file`n  '$sourceFile3FullPath'"

              $filterSourceFile2 = '^</UpdateInfoExternList>$'
              $filterSourceFile3 = '^<.xml version=".*" encoding=".*".>$|^<UpdateInfoExternList>$'

              Write-Host "Reading Keepass plugin configuration file`n  from '$sourceFile2FullPath'"
              $contentsFile2 = ( Get-Content -Path $sourceFile2FullPath ) -replace($filterSourceFile2) | where {$_ -ne ''}
              Write-Host "Reading Keepass plugin configuration addendum file`n  from'$sourceFile3FullPath'"
              $contentsFile3 = ( Get-Content -Path $sourceFile3FullPath ) -replace($filterSourceFile3) | where {$_ -ne ''}

              Write-Host "Combining Keepass plugin configuration files"
              $contentsFile = @()
              $contentsFile2 | ForEach-Object { $contentsFile += $_ }
              $contentsFile3 | ForEach-Object { $contentsFile += $_ }

              Write-Host "Writing combined Keepass plugin configuration files`n  to '$destFile2FullPath'`n"
              $contentsFile | Out-File -FilePath $destFile2FullPath
              $sourceFile2FullPath = $destFile2FullPath
           }
       }
       if (Test-Path $destFile2FullPath) {
          Write-Host "Found Keepass plugin configuration file`n  '$destFile2FullPath'"
          $destFile2FullPathTimestamped = (Get-FileName-Globbed -filename $destFile2FullPath -globbed 'time')
	  Write-Host "Backing up KeePass plugin configuration file '$destFile2FullPath'`n   to (timestamped) file '$destFile2FullPathTimestamped'"
	  Copy-Item -Path $destFile2FullPath -Destination $destFile2FullPathTimestamped -Force
       }
    } else {
       $errorMessage = "Cannot install plugin files in Keepass plugin destination!"
    }
  }
}

Log in or click on link to see number of positives.

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Add to Builder Version Downloads Last Updated Status

Discussion for the KeePass Plugin Early Update Check Package

Ground Rules:

  • This discussion is only about KeePass Plugin Early Update Check and the KeePass Plugin Early Update Check package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or KeePass Plugin Early Update Check, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus