Menu

#397 How do you set PWS_PREFSDIR?

v1.0_(example)
closed
None
1
2014-07-14
2013-12-15
Pablo674
No

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.

Discussion

  • Rony Shapiro

    Rony Shapiro - 2013-12-15
    • status: open --> pending
     
  • Rony Shapiro

    Rony Shapiro - 2013-12-15

    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.

     
  • Pablo674

    Pablo674 - 2013-12-15

    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 ?

     
  • Rony Shapiro

    Rony Shapiro - 2013-12-15

    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

     
  • Pablo674

    Pablo674 - 2013-12-15

    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.

     
  • Rony Shapiro

    Rony Shapiro - 2014-07-14

    Documentation clarified in commit 7722344

     
  • Rony Shapiro

    Rony Shapiro - 2014-07-14
    • status: pending --> closed
    • assigned_to: Rony Shapiro
     

Log in to post a comment.