## Command Line Arguments

Invoking Password Safe with no arguments will cause the application to prompt you for the combination of the last database that was opened, or for the combination of a new database if none was previously opened on your machine (e.g., the first time you use Password Safe). It is, however, possible to modify this by invoking Password Safe as follows:

- pwsafe database
  This will open the specified database file, instead of the last one opened. If just a filename is given, without a path, it will be searched for in the directory in which the application was invoked. Note that if the filename and/or path has spaces, it should be enclosed in double quotes.
- pwsafe -r [database]
  This will open the specified database in read-only mode. If a database is not specified, then the application will prompt the user for a database, which will be opened in read-only mode.
- pwsafe -e filename
  This will prompt the user for a passphrase, and encrypt the file with a key derived from the passphrase. Note: The file can be any file. The encrypted file will have the same name as the original file, with ".PSF" appended to it.
- pwsafe -d filename
  This will prompt the user for a passphrase, and decrypt the file with a key derived from the passphrase. Note: This will work only on files that were encrypted by invoking pwsafe with the '-e' option (see above).
- pwsafe -c
  This will start the application closed, that is, with no database, and without the initial opening dialog (To access a database, use the File menu).
- pwsafe -s [database]
  This will start the application "silently", that is, minimized and with no database (unless one is specified). When the application is restored, the user is presented with the opening dialog box (This option is meant for starting the application upon login, via a shortcut in the user's Startup folder). Note: This implicitly puts the application in the system tray.
- pwsafe -m
  This is the same as the '-c' option, with the addition that the application is started as minimized.

In addition, the following options are accepted and may be useful if you wish to share the same preferences across several machines, for example, when running Password Safe from a disk-on-key.

- -u username
  This will cause the application to read and write preferences under the specified username, instead of under the login name.
- -h hostname
  This will cause the application to read and write preferences under the specified hostname, instead of under the machine's name.
- -g config_file
  This will cause the specified file to be used for loading and storing preferences, instead of the default pwsafe.cfg. If just a filename is given, without a path, it will be searched for in the directory in which the application was invoked. Note that if the filename and/or path has spaces, it should be enclosed in double quotes.

Finally, there are some special command line flags beginning with "--". They are:

- --novalidate
  This will prevent Password Safe validating databases automatically when they are opened. Some validation is always required e.g. uniqueness of the entry's ID and the group/title/username combination.
- --testdump
  This allows testers to verify the mini-dump production when Password Safe has a problem to help developers resolve the isssue.
- --cetreeview
  A new feature allows two entries to be selected and compared either via the Edit menu or by right-clicking on either. Selecting more than one entry is natively supported in the List view but not in the Tree view. This flag enables "Compare Entries" in the Tree view via an extra dialog to select the "other" entry. Supporting multiple selction in the Tree view is under development. Once supported, this flag will be ignored.