As long as you're not moving the folder it remembers it correctly. But once you move the portableapps folder to another location, keepassxc only remembers the database.
KeepassPro remembers everything and doesn't have this problem.
I'm not sure whether this is an issue with the portableapps.com config files or if the XC devs need to improve something.
Even when I use KeepassXC directly in portable mode without any of our stuff added, it doesn't seem to remember the keyfile for a database. Yours remembers it if you don't move?
Sometimes, the impossible can become possible, if you're awesome!
No, the default KeepassXC is even worse and doesn't even remember the relative database location. But PA.com generally adds this sort of functionality, that's why I made this thread.
I saw someone on this forum mention a line they add to one of their PA configs, but it's not ideal.
I brought it up with the KeepassXC devs here, and included screenshots & comparisons to Keepass Pro: https://github.com/keepassxreboot/keepassxc/issues/11462#issuecomment-25...
I figured out some of it. If you create a new database with keyfile and close it, KeePassXC doesn't remember it. Once you then open it, it will be stored as recent files and remember both the database and keyfile when used in a single location.
When you move PCs, both the remembered keyfile and database paths change, so KeePassXC itself won't remember either. KeePassXC Portable's launcher will portablize the last opened database path as that is stored as plaintext in the keepassxc_local.ini file. The LastKeyFiles entry seems to be stored as a QByteArray which isn't adjusted as you move paths.
Sometimes, the impossible can become possible, if you're awesome!
Would it be possible to add that functionality? This is the tweak I mentioned that I saw someone else say they use (I just realized they did it for Pro not XC):
PortableApps command line arguments: https://portableapps.com/node/19115
In my something\PortableApps\KeePassProPortable\App\AppInfo\Launcher\KeePassProPortable.ini I have following:
CommandLineArguments='C:\Path\to\Passwords.kdbx -keyfile:C:\Path\to\keyfile.key'
I put it in as the last line in the [Launch] section.
It has to be added again after every update.
I'm not sure if it would work without the "C:" part so that you don't have to change it every time you move the folder.
You can use a better option for setting it. Go to KeePassXCPortable\Other\Source and copy the file AppNamePortable.ini to the KeePassXCPortable directory. Rename it to KeePassXCPortable.ini. Add your additional parameters to the AdditionalParameters= line in there. That file is for users and is preserved as you upgrade to newer versions. The one within the AppInfo\Launcher directory is part of the app and will be overwritten on each upgrade.
The -keyfile option might support a relative path. Experiment a bit to try it out. That's part of KeePassXC and not us. Remember that you'll be relative from KeePassXCPortable\App\KeePassXC\KeePassXC.exe.
Sometimes, the impossible can become possible, if you're awesome!
Thanks! It looks like KeepassXC doesn't support relative paths.
I put the keyfile in "\PortableApps\KeePassXCPortable\App\KeePassXC\test".
I have "KeePassXCPortable.ini" in \PortableApps\KeePassXCPortable\ with "AdditionalParameters='-keyfile:\test\key-name.keyx'"
But it still doesn't detect it.