when taking the usb drive to different computer the drive letter frequently changes. I like to run some of the apps on the PA drive using KeePass to keep track of the passwords I've assigned. How on the command line do I get it to recognize the current drive letter of the PA USB drive?
Could you please explain more what you mean?
I am a Christian and a developer and moderator here.
“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1
I've set up a couple of password protected openoffice documents on the thumb drive using openoffice portable: XXXX.odt & whatever.
I've then gone into KeePass and added this as the URL:
cmd://"E:\PortableApps\OpenOfficePortable\Data\Documents\XXXX.odt" with the auto commands for username and password. It all works on the home computer. For the office computer I use:
cmd://"H:\PortableApps\OpenOfficePortable\Data\Documents\XXXX.odt". I've changed the drive letter to match how the portable apps thumb drive is listed on the machine at work.
I know I'll have to change or create one for each machine because of the drive letter change, BUT DO I HAVE TO? Is there a way to set the drive letter to whatever the thumb drive letter is without manually changing it?
Hope that clears up what I'm trying to do.
Did you try to use relative paths instead? I tried it on a test.odt with libreoffice:
cmd://"\PortableApps\LibreOfficePortable\Data\test.odt" and it worked as I expected. I don't know your exact setup. It should work, if KeePass and the documents are on the same drive. It starts the associated App for .odt files (LibreOffice non portable on my home machine), but I think your setup should do the same.
Example: Your thumb drive containes your documents in X:\PortableApps.com\OpenOfficePortable\Data\Documents. Launching the URL
cmd://"\PortableApps\OpenOfficePortable\Data\Documents\xxxx.odt"
from KeePass should start that file with the associated App independent of the drive letter. Auto-Type should that fill in the stored password.Hope that helps.
The other option is set your thumb drive to have the same drive letter in both places. While this won't work when you take your drive to a different computer, if it is only the two, you can cover most cases.
I use a portable hard drive regularly at both work and home, using VirtualBox images on my hard drive in both locations. Works fine because the hard drive has been assigned the same drive letter on both PCs.