Menu

Automatic detection of installation location

Luckyrat
2008-09-02
2012-11-20
  • Luckyrat

    Luckyrat - 2008-09-02

    Hi,

    Is it possible to automatically detect the installation path of KeePass 2.x from an external process?

    I'd like my KeeICE plugin installer to be able to work out where to put its DLL files without user intervention and ultimately report back to KeeFox so that the Firefox toolbar can present options consistent with the current installation state of the various pre-requisites.

    Thanks,
    Chris

     
    • Dominik Reichl

      Dominik Reichl - 2008-09-03

      When the user is using the installer package of KeePass 2.05, you can find the installation path in the registry:
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\KeePass Password Safe_is1

      The 'InstallLocation' key/value-pair contains the installation directory path (with terminating \).

      However, because of versioning problems (1.x and 2.x used the same uninstallation ID), the uninstall registry key will be changed in KeePass 1.13 and 2.06. In 2.06, the key will be:
      HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\KeePass2_is1

      Best regards
      Dominik

       
      • Luckyrat

        Luckyrat - 2008-09-03

        Great, that sounds useful.

        Would there be an equivalent for a Linux or Mac installation? Maybe just a query on the most common package managers such as yum or apt?

         
        • Dominik Reichl

          Dominik Reichl - 2008-09-03

          Unfortunately I have zero development experience with APT and YUM package managers, sorry.

          Best regards
          Dominik

           
    • Dominik Reichl

      Dominik Reichl - 2008-09-03

      [Edit:] The new key in KeePass 2.06 will be:
      HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\KeePassPasswordSafe2_is1

      Best regards
      Dominik

       
    • Luckyrat

      Luckyrat - 2008-11-13

      I've just installed 2.06 and found that the registry key above was not set. Instead, this key holds the keepass installer details:

      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{2CBCF4EC-7D5F-4141-A3A6-001090E029AC}

      Unfortunately, it does not contain a value for InstallLocation. Has something gone wrong with my install?

      Thanks,
      Chris

       
      • Dominik Reichl

        Dominik Reichl - 2008-11-14

        The registry key indicates that you used the MSI package of KeePass, not the installer.

        The installer (KeePass-2.06-Beta-Setup.exe), which I highly recommend over the MSI package, should create the registry key mentioned in earlier posts.

        If you also want to support the MSI package of KeePass, you can find a path to the installed KeePass.exe in "HKEY_CLASSES_ROOT\KeePass Database\shell\open\command" (standard value).

        Best regards
        Dominik

         

Log in to post a comment.

MongoDB Logo MongoDB