You are here

Call running KeePassPro with command line arguments

5 posts / 0 new
Last post
hunhejj
Offline
Last seen: 3 years 6 months ago
Joined: 2016-08-24 06:39
Call running KeePassPro with command line arguments

Hi,
first of all I am happy to see that KeePassPro is now available on portableApps! I wanted to do the switch but I am missing a key feature.

I have some batch scripts that call KeePass with command line arguments. If an instance is running already, the arguments should be passed to that running instance. This works with the original KeePass as expected however it does not work with the portableApps version. Command line arguments are passed to the instance only when it is not running in the background yet. This is a showstopper for me. Could you please fix that?

John T. Haller
John T. Haller's picture
Online
Last seen: 40 min 20 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
EXE and arguments?

Are you attempting to pass command line arguments to the running instance via KeePassProPortable.exe or via KeePass.exe? What parameters are you passing so that I can attempt to recreate it?

The launcher will correctly pass arguments through. I was able to test this by first running KeePassProPortable.exe and then, while it was running with its UI up, running KeePassProPortable.exe --exit-all from the command line and it properly closed the running instance.

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

hunhejj
Offline
Last seen: 3 years 6 months ago
Joined: 2016-08-24 06:39
Portable.exe and -pw:

Sorry, I didn't notice your answer until now.

Here's an example:

KeePassProPortable.exe A.kdbx -pw:foo This launches keepass and unlocks A.kdbx as expected.

Then while it's running, I call: KeePassProPortable.exe B.kdbx -pw:bar Something definitely happens, but B.kdbx still won't get unlocked.

John T. Haller
John T. Haller's picture
Online
Last seen: 40 min 20 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Work With Base?

Does it work with the base app to open another database while one is already open? The KeePassProPortable.exe should just run keepass.exe and pass in the command line it got unaltered. I know it did it with --exit-all when I tried it. Try passing your A.kdbx string and then run it again with --exit-all to see if it is at least passing that in correctly, please.

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

hunhejj
Offline
Last seen: 3 years 6 months ago
Joined: 2016-08-24 06:39
Base works

This works well:

KeePassProPortable\App\KeePass.exe A.kdbx -pw:foo

KeePassProPortable\App\KeePass.exe B.kdbx -pw:foo

Calling the same on KeePassProPortable.exe does not work.

--exit-all works both on the base and on KeePassProPortable.exe

Log in or register to post comments