How do you set PWS_PREFSDIR?
Popular easy-to-use and secure password manager
Brought to you by:
ronys
The help file of PWsafe says (PasswordSafe Preferences): "If, however, the PWS_PREFSDIR environment variable is set, pwsafe will use the configuration file stored there."
Fine. So how do you set it? Is it a DOS environment variable?
Surely not, for if an app is truly portable, all info should be on the portable device.
PWS_PREFSDIR is a "DOS" environment variable under Windows, and a shell environment variable under Linux.
One way it could be used is in a "wrapper" script/batch file that is also on the portable device, setting the config dir as needed.
Another option would be to use the '-g' flag, which allows you to specify the config file at the command line.
On my machine (XP SP2) there is no PWS_PREFSDIR. I checked using the set command without parameters. Should I perhaps create it and then script a batch line like SET PWS_PREFSDIR = G:\CFGDIR ?
By default this environment variable isn't defined.
The batch file should probably both set the env. variable and invoke pwsafe.
You can also set up the batch file to invoke pwsafe with the -g option, e.g.,
pwsafe.exe -g G:\CFGDIR\pwsafe.cfg
Thank you very much. Both methods work perfectly. It seems to me that the method with the -g option is preferable for a pendrive assuming that it does not load any system info in the host machine which may refuse to accept a new environment variable. The other method is better for one's own computer where the environment is constant.
I suggest that there should be an option in the Manage menu which allows the user to choose where he keeps his settings. Another suggestion would be to clarify the help on this topic.
Thank you again for a quick solution.
Documentation clarified in commit 7722344