You are here

KeePass: Command Line Arguments

7 posts / 0 new
Last post
colect@earthlink.net
Offline
Last seen: 17 years 4 weeks ago
Joined: 2007-03-21 15:37
KeePass: Command Line Arguments

how do you pass command line arguments to keepass.exe through keepass portable? I would like to use Another Backup Plugin but for it to work it requires that you pass a command line argument to keepass.exe and the PortableApps version starts up with keepassportable.exe.

John T. Haller
John T. Haller's picture
Online
Last seen: 26 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Two Ways

Pass it to KeePassPortable.exe and it'll hand it off to KeePass.exe.

Or, if it's something you want to use consistently you can use an INI file. It's explained in the readme.txt within the Other\KeePassPortableSource directory.

Sometimes, the impossible can become possible, if you're awesome!

colect@earthlink.net
Offline
Last seen: 17 years 4 weeks ago
Joined: 2007-03-21 15:37
command line argument

ok, this might be a dumb question but I'm kinda new to command line arguments. I set up the INI file like this:

[KeePassPortable]
KeePassDirectory=App\keepass
SettingsDirectory=Data\settings
KeePassExecutable=keepass.exe
AdditionalParameters=F:\PortableApps\KeePassPortable\Data\Database.kdb /backup.path:C:\KeePassBackup\
DisableSplashScreen=true

right now everything is working fine, but my question is how do you write the Additional Parameters line so that it will work when I plug my usb flash drive into another computer and the drive letter changes?

John T. Haller
John T. Haller's picture
Online
Last seen: 26 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
You don't

And you wouldn't want to set it up this way as it would backup your database on PCs which aren't your own (a very bad idea).

A better idea would be to run it as normal and then have a shortcut on your PC pointing at KeePass Portable that launched it with those params when you wanted it to be backed up.

Sometimes, the impossible can become possible, if you're awesome!

colect@earthlink.net
Offline
Last seen: 17 years 4 weeks ago
Joined: 2007-03-21 15:37
I understand

I understand why you would not want your password database stored on other computers, but what I want is for it to backup the database on my home pc and my work pc(which both assign a different drive letter to the flash drive). And the way I understood it ABP will only backup if the backup path already exist so as long as there isn't a folder named KeePassBackup in the C: drive it shouldn't copy anything to the pc, right? I do admit KeepassBackup might be a generic folder name that could have a small chance of showing up on a different pc but I can change the path to something more specific to prevent this from happening. So I guess my question is is there a way to make the initial database path relative to the folder that KeePassPortable.exe is in so that it wouldn't matter what the drive letter is, it would still open my database file and backup if the backup.path exists?

hfelton
Offline
Last seen: 8 years 8 months ago
Joined: 2006-10-12 04:59
did you try just using the

did you try just using the standard .. (relative) directory? i just made a documents\keepass dir on the usb-drive and then in keepassportable.ini i used ..\documents\keepass\database.kdb for additional args and it just works... (this way i can backup my docs-dir easily).

colect@earthlink.net
Offline
Last seen: 17 years 4 weeks ago
Joined: 2007-03-21 15:37
I thought I did

try that with no avail. But when I seen your post I thought I would give it another try and it seems to be working so far. I just took out the "F:" of the additional parameters line in my INI file and it's started working. Now I'll have to try it on my work pc to see if it still works. I'm happy it was that easy but now I feel kinda stupid. Thanks for your help.

Log in or register to post comments