GPG, Windows and USB

Change the PATH environment variable in order to have the command available in every position of the file system.

Right click on My Computer, Properties, Advanced, Environment variables, select the path from the System Variables and append the path to the gpg exe location (in my case C:\Program Files\GNU\GnuPG). Remember to separate it from the others with a “;” character.

Open a new shell and type gpg in order to see if the path was correctly taken, and exit with a CTRL+C, you should get something similar to

gpg is up and running. Now the problem is to have all keys on a usb device, so it will be possible to have sensible data cyphered without leaving the keys on the hard disk.

Open the registry editor (regedit.exe), navigate to HKEY_CURRENT_USER\Software\GNU\GNUPG and create a new String Value: HomeDir. Assign to it the path to the gpg directory on your usb drive in my case E:\davide\gnupg)