gnupg feature request

Jim C. jcllings at
Sun Dec 7 13:18:02 CET 2003

Hash: SHA1

I found part of the problem but there is still a pretty big bug
somewhere.  Apparently I've been forgetting to check and make sure what
user the window belongs to before testing.  Regardless, I've still got a
problem though.

Also I would like to mention the following:

While I am using the version that comes from Nulify, with the windows
based version that is not from Nullify you get registry settings as follows:





[HKEY_CURRENT_USER\Control Panel\Mingw32]

[HKEY_CURRENT_USER\Control Panel\Mingw32\NLS]

[HKEY_CURRENT_USER\Control Panel\Mingw32\NLS]

This second version came from the website Wren mentioned, i.e.



"gpgProgram"="C:\\PRogram Files\\GnuPG\\gpg.exe"

[HKEY_CURRENT_USER\Control Panel\Mingw32]

[HKEY_CURRENT_USER\Control Panel\Mingw32\NLS]
"MODir"="C:\\Program Files\\GnuPG\\Locale"

Why does the first version use HKEY_LOCAL_MACHINE to store HomeDir and
the second uses HKEY_CURRENT_USER.  Which is correct?  My testing shows
that deletion of [HKEY_CURRENT_USER\Software\GNU] and subsequent use of:

Windows Registry Editor Version 5.00

"HomeDir"="C:\\Documents and Settings\\jhondoa\\Application Data\\GnuPG"
"gpgProgram"="C:\\PRogram Files\\GnuPG\\gpg.exe"

Eliminated the problem for user jhondoa:

C:\Documents and Settings\jhondoa>gpg --list-keys
C:\Documents and Settings\jhondoa\Application Data\GnuPG\pubring.gpg
- ---------------------------------------------------------------------
pub  XXXXX/XXXXXXXX 2003-12-02 Jhon D. (no password) <jhondoa at>
sub  XXXXX/XXXXXXXX 2003-12-02

Logically then, this is the correct setting and the other should be
deleted since we've gotten it to work for one (and only one) user.

So, our next task should be to alter this setting to work for all users
by inserting an environment variable, right?  When we do this we get:

Windows Registry Editor Version 5.00

"HomeDir"="C:\\Documents and Settings\\%USERNAME%\\Application Data\\GnuPG"
"gpgProgram"="C:\\Program Files\\GnuPG\\gpg.exe"

...and this results in:

C:\Documents and Settings\jhondoa>gpg --list-keys
gpg: keyblock resource `C:\Documents and Settings\%USERNAME%\Application
Data\GnuPG\pubring.gpg': file open error

C:\Documents and Settings\jhondoa>ECHO %USERNAME%

Comments?  Suggestions?  Help?? :-)
Keep in mind that '--homedir "%APPDATA%"\GnuPG' works fine from the
command line. Also, my searches through the registry show that no other
Windows programs use an environment variable in the registry like this.
~ Perhaps I am going about this all wrong or perhaps it should be built
directly into the App?

Jim C.

J. Wren Hunt wrote:
| If you place the files in "Documents and
| Settings\%username-goes-here%\My Documents", or "Application Data", this
| is the way that windows will correctly handle multiple-users. Nothing
| needs to be done for GPG other then ensure that the registry setting for
| HOMEDIR is set to the correct path.
| Wren
Version: GnuPG v1.2.3-nr1 (Windows XP)
Comment: Using GnuPG with Mozilla -


More information about the Gnupg-users mailing list