HOW TO: Install PGP Command Line on Windows


Article ID: 156037


Updated On:


PGP Command Line


This article details how to install, configure the home directory, and license PGP Command Line on Windows.

To download PGP Command Line, please refer to our KB article TECH164616. - How to download the latest software from File Connect.


Installing on Windows

This section tells you how to install, change the home directory, and uninstall on Windows.


Using PGP Command Line and PGP Desktop on the same system

PGP Command Line and PGP Desktop can be installed on the same system at the same time.

To use PGP Command Line and PGP Desktop for Windows on the same 64-bit system, you must use the 64-bit version of PGP Desktop and the 32-bit version of PGP Command Line. This procedure ensures compatible versions of the PGP SDK are used. The PGP SDK for the 64-bit version of PGP Command Line includes functionality that makes it incompatible with PGP Desktop for Windows.


To Install on Windows

To install PGP Command Line onto a Windows system:

  1. Close all Windows applications.
  2. Download the installer application,, to a known location on your system.
  3. Unzip the file PGPCommandLine101Win.msi will be extracted.
  4. Double click on PGPCommandLine101Win.msi.
  5. Follow the on-screen instructions.
  6. If prompted, restart your machine. A restart is needed only if other PGP products are also installed on the same machine. The Windows PGP Command Line application, pgp.exe, is installed into:

C:\Program Files\PGP Corporation\PGP Command Line\

After PGP Command Line runs for the first time, a home directory will be created automatically in the user’s home directory:

C:\Documents and Settings\<user>\My Documents\PGP\

Application data is stored in the directory:

C:\Documents and Settings\<user>\Application Data\PGP Corporation\PGP

Note: Locations may be different for different Windows versions.


Changing the Home Directory on Windows

The home directory is where PGP Command Line stores its keyring files. If a different PGP product has already created this directory, PGP Command Line will also use it (thus, PGP Command Line can automatically use existing PGP keys).

PGP Command Line data files, such as keys, are stored in the home directory:

C:\Documents and Settings\<user>\My Documents\PGP\

PGP Command Line application files, such as the configuration file PGPprefs.xml, are stored in:

C:\Documents and Settings\<user>\Application Data\PGP Corporation\PGP\

If you want the home directory changed on a permanent basis, you need to create the PGP_HOME_DIR environment variable and specify the path of the desired home directory.


To create the PGP_HOME_DIR environment variable on a Windows system:

  1. Click Start, select Settings, select Control Panel, and then select System. The System Properties dialog appears.
  2. Select the Advanced tab, then click Environment Variables.
  3. In the User Variables section, click New.
  4. In the Variable name field, enter PGP_HOME_DIR. In the Variable value field, enter the path of the home directory you want to use. For example: C:\PGP\PGPhomedir\
  5. Click OK.

The Environment Variables screen reappears. PGP_HOME_DIR appears in the list of user variables.


Authorizing a PGP Command Line License

If there is a license number and a working Internet connection, the copy of PGP Command Line can be authorized.

Use --license-authorize to license PGP Command Line.

The following options are required:

  •  --license-name <Name>
    • where <Name> is your name or a descriptive name.
  • --license-organization <Org>
    • where <Org> is the name of your company.
  • --license-number <Number>
    • where <Number> is a valid license number.

The following option is not required but is recommended:

  • --license-email <EmailAddress>
    • <EmailAddress> is a valid email address, generally the email address of the PGP Command Line administrator.




For example:

pgp --license-authorize --license-name "Alice Cameron"

--license-organization "Example Corporation"

--license-number "aaaaa-bbbbb-ccccc-ddddd-eeeee-fff"

--license-email "[email protected]"

(When entering this text, it all goes on a single line.)


In version 10.3.2 MP8 the command to license PGP Command line was simplified, see TECH232667.
You only insert the license number, no name, organization or email address.
Example: " pgp --license-authorize --license-number "aaaaa-bbbbb-ccccc-ddddd-eeeee-fff" "