Master database location

The master database consists of KEYPASS.DAT, as well as one or more KEYFILE.* files if you have attached files in the database.

For simplicity and ease of backup, the master database has always been located in the same folder as the KeyPass executable files. However, starting from V4.5.0, if KeyPass cannot find KEYPASS.DAT in the installation folder, it will attempt to look for the master database in the user profile folder instead.

Why did we make this change? The main reason is because Windows Vista enforces stricter rules on who can write directly to C:\Program Files, which is traditionally where Windows programs are installed. By default, Vista will perform redirection on file I/O to C:\Program Files via a process known as "data virtualization". So suppose KeyPass attempts to create KEYPASS.DAT under C:\Program Files\KeyPass, each user running KeyPass will get a different version of KEYPASS.DAT, though they would all appear to be the same file.

Why didn't we simply go along with Vista's data virtualization? Well, data virtualization is a temporary stop-gap measure for older Windows applications, and Microsoft expects everyone to stop writing to C:\Program Files for newer application releases. In addition, data virtualization is confusing and potentially dangerous (since a different user or even the administrator will either not see the file, or get a different version of the file altogether), and it can fail for various reasons. So we decided to do the right thing and store data files in the user profile folder where applicable.

How does this impact you? Well, if you are migrating master database files manually, you need to be aware of where to put them. For non-Vista machines, it is perfectly alright to still put them in the same folder as the KeyPass executables. For portable installations or installations that are not located under C:\Program files, the same rule applies. However, if you have installed KeyPass on a Vista machine under C:\Program Files, then you should copy the master database files to the user profile folder. An easy way to determine the exact location is to let KeyPass create a new master database, then check for the full path under Database information before replacing the files.


Converted from CHM to HTML with chm2web Standard 2.84 (unicode)