Chocolatey Fest - Chocolatey's inaugural conference on Windows Automation (WinOps) is coming - Learn more!

KeePass Plugin AutoTypeCustomFieldPicker

1.0.0.0

Package test results are passing.

This package was approved by moderator ferventcoder on 8/13/2015.

MicrosoftKeyImporter is a KeePass 2.x plugin to provide support for a placeholder {PICKCUSTOMFIELD}.

When auto-typing a sequence containing this placeholder, a window is displayed that allows to pick a custom string field (whose value is then inserted at the placeholder's position).

Purpose

On some sites, particularly banking related sites, there are login forms where you have to enter "The answer for security question 3 out of 5". In KeePass, you probably have stored these answers in custom fields.

With the current {PICKCHARS} placeholder you can pick single chars out of a field. But for this use case you need a placeholder for a complete field value.

Usage

Just use the new placeholder {PICKCUSTOMFIELD} in an Auto-Type sequence. When you execute such a sequence, a window will popup and let you choose a custom field (just like {PICKCHARS} does). The value of the picked custom field will be replaced in the Auto-Type sequence.

To install KeePass Plugin AutoTypeCustomFieldPicker, run the following command from the command line or from PowerShell:

C:\> choco install keepass-plugin-autotypecustomfieldpicker

To upgrade KeePass Plugin AutoTypeCustomFieldPicker, run the following command from the command line or from PowerShell:

C:\> choco upgrade keepass-plugin-autotypecustomfieldpicker

Files

Hide
  • tools\chocolateyInstall.ps1 Show
    # powershell v2 compatibility
    $psVer = $PSVersionTable.PSVersion.Major
    if ($psver -ge 3) {
      function Get-ChildItemDir {Get-ChildItem -Directory $args}
    } else {
      function Get-ChildItemDir {Get-ChildItem $args}
    }
    
    $packageName = 'keepass-plugin-autotypecustomfieldpicker'
    $typName = 'AutoTypeCustomFieldPicker.plgx'
    $packageSearch = 'KeePass Password Safe'
    $url = 'https://github.com/berrnd/KeePassAutoTypeCustomFieldPicker/raw/master/AutoTypeCustomFieldPicker.plgx'
    $checksum = '378ed48dbce56a75b691c744e49113f1e27bb756'
    $checksumType = 'sha1'
    
    try {
    Write-Verbose "Searching registry for installed KeePass..."
    $regPath = 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*" `
                               -and `
                               $_.DisplayVersion -ge 2.0 `
                               -and `
                               $_.DisplayVersion -lt 3.0 } `
               | ForEach-Object {$_.InstallLocation}
    $installPath = $regPath
    if (! $installPath) {
      Write-Verbose "Searching $env:ChocolateyBinRoot for portable install..."
      $binRoot = Get-BinRoot
      $portPath = Join-Path $binRoot "keepass"
      $installPath = Get-ChildItemDir $portPath* -ErrorAction SilentlyContinue
    }
    if (! $installPath) {
      Write-Verbose "Searching $env:Path for unregistered install..."
      $installFullName = (Get-Command keepass -ErrorAction SilentlyContinue).Path
      if (! $installFullName) {
        $installPath = [io.path]::GetDirectoryName($installFullName)
      }
    }
    if (! $installPath) {
      Write-Warning "$($packageSearch) not found."
      throw
    }
    Write-Verbose "`t...found."
    
    Write-Verbose "Searching for plugin directory..."
    $pluginPath = (Get-ChildItemDir $installPath\Plugin*).FullName
    if ($pluginPath.Count -eq 0) {
      $pluginPath = Join-Path $installPath "Plugins"
      [System.IO.Directory]::CreateDirectory($pluginPath)
    }
    $installFile = Join-Path $pluginPath "$($packageName).plgx"
    Get-ChocolateyWebFile -PackageName "$packageName" `
                          -FileFullPath "$installFile" `
                          -Url "$url" `
                          -Checksum "$checksum" `
                          -ChecksumType "$checksumType"
    
    if ( Get-Process -Name "KeePass" `
                     -ErrorAction SilentlyContinue ) {
      Write-Warning "$($packageSearch) is currently running. Plugin will be available at next restart of $($packageSearch)." 
    } else {
      Write-Host "$($packageName) will be loaded the next time KeePass is started."
      Write-Host "Please note this plugin may require additional configuration. Look for a new entry in KeePass' Menu>Tools"
    }} catch {
      throw $_.Exception
    }
  • tools\chocolateyUninstall.ps1 Show
    # powershell v2 compatibility
    $psVer = $PSVersionTable.PSVersion.Major
    if ($psver -ge 3) {
      function Get-ChildItemDir {Get-ChildItem -Directory $args}
    } else {
      function Get-ChildItemDir {Get-ChildItem $args}
    }
    
    $packageName = 'keepass-plugin-autotypecustomfieldpicker'
    $typName = 'AutoTypeCustomFieldPicker.plgx'
    $packageSearch = 'KeePass Password Safe'
    
    try {
    Write-Verbose "Checking KeePass is not running..."
    if (Get-Process -Name "KeePass" `
                    -ErrorAction SilentlyContinue) {
      Write-Warning "$($packageSearch) is running. Please save any opened databases and close $($packageSearch) before attempting to uninstall KeePass plugins."
      throw
    }
    
    Write-Verbose "Searching registry for installed KeePass..."
    $regPath = 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*"} `
               | ForEach-Object {$_.InstallLocation}
    $installPath = $regPath
    if (! $installPath) {
      Write-Verbose "Searching $env:ChocolateyBinRoot for portable install..."
      $binRoot = Get-BinRoot
      $portPath = Join-Path $binRoot "keepass"
      $installPath = Get-ChildItemDir $portPath* -ErrorAction SilentlyContinue
    }
    if (! $installPath) {
      Write-Verbose "Searching $env:Path for unregistered install..."
      $installFullName = (Get-Command keepass -ErrorAction SilentlyContinue).Path
      if (! $installFullName) {
        $installPath = [io.path]::GetDirectoryName($installFullName)
      }
    }
    if (! $installPath) {
      Write-Warning "$($packageSearch) not found."
      throw
    }
    Write-Verbose "`t...found."
    
    Write-Verbose "Searching for plugin directory..."
    $pluginPath = (Get-ChildItemDir $installPath\Plugin*).FullName
    if ($pluginPath.Count -eq 0) {
      throw "Plugins directory not found."
    }
    $pluginTypFile = Join-Path $pluginPath $typName
    $pluginChocoFile = Join-Path $pluginPath "$($packageName).plgx"
    Remove-Item -Path $pluginTypFile `
                -Force `
                -ErrorAction SilentlyContinue
    Remove-Item -Path $pluginChocoFile `
                -Force `
                -ErrorAction Continue
    } catch {
      throw $_.Exception
    }

Virus Scan Results

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.

Dependencies

Package Maintainer(s)

Software Author(s)

  • Bernd Bestel

Copyright

© 2013 Bernd Bestel

Tags

Release Notes

Program

Package

  • Automatically built and uploaded by dtgm

Version History

Version Downloads Last updated Status

Discussion for the KeePass Plugin AutoTypeCustomFieldPicker Package

Ground rules:

  • This discussion is only about KeePass Plugin AutoTypeCustomFieldPicker and the KeePass Plugin AutoTypeCustomFieldPicker 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 AutoTypeCustomFieldPicker, 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
Chocolatey.org uses cookies to enhance the user experience of the site.
Ok