Friday, July 15, 2011

IsComputer

You'll remember that I've been using KeePass for a long time to keep up with my passwords. And that I changed my web hosting provider. That left me without a host that provided ftp for my KeePass backup.

I've become a Dropbox user so I thought that I'd use Dropbox to backup up the KeePass database. The problem is that not all PCs are running Dropbox logged into my account. Rather than coming up with a perfect way to solve this I've come up with one that's "good enough."

9 times out of 10 when I change my passwords I'm running KeePass on a particular laptop in my house. To make things interesting though that laptop doesn't actually run Dropbox either but rather accesses the Dropbox folder across the LAN. So what I wanted to do was when running on this laptop to copy the Database.kdb to the networked Dropbox folder.

Today I came across a program from IntelliAdmin that will let me do what I wanted. The program is IsComputer. With a simple batch file I can check to see if KeePass is running on that particular laptop and if it is copy the Database.kdb to the networked Dropbox folder.

I put the IsComputer.exe in the KeePass folder on the USB drive. Then I have the DB Backup plugin execute the following .bat file when it needs to backup the KeePass database.

IsComputer /name:laptop

if ERRORLEVEL 1 goto RUN_SCRIPT
if ERRORLEVEL 0 goto EXIT_SCRIPT

:RUN_SCRIPT

REM I must be running on laptop

copy Database.kdb \\server\d\Dropbox\Keepass

:EXIT_SCRIPT

pause

It works perfectly.

No comments: