Error generating new keys on Windows with gnupg 1.4.3
z.himsel at gmail.com
Sat Jun 3 01:08:04 CEST 2006
-----BEGIN PGP SIGNED MESSAGE-----
On 6/2/2006 6:24 PM, Jee Kay wrote:
> Whenever I try to generate a new secret key on Windows with gnupg
> 1.4.3, I get the following output immediately following the second
> request for my passphrase:
> gpg: NOTE: you should run 'diskperf -y' to enable the disk statistics
> A few seconds after that, a Windows error box pops up with this
> Microsoft Visual C++ Runtime Library
> Runtime Error!
> Program: z:\gnupg\gpg.exe
> This application has requested the Runtime to terminate it in an
> unusual way. Please contact the application's support team for more
> Has anyone seen anything like this or know where to start debugging
> it? I don't know if it makes any difference, but I have
> HKLU\Software\GNU\gpgProgram set to z:\gnupg\gnupg.exe and HomeDir is
> set to z:\gnupg.
> Please keep me in CC on any replies as I am not subscribed.
> Thanks in advance,
> Gnupg-users mailing list
> Gnupg-users at gnupg.org
Did you try using an environmental variable instead of using the registry?
Assuming you're using WinXP, open up the system properties
(right-click "My Computer">Properties). In the "Advanced" tab, click
the "Environmental Variables" button on the bottom. You should now see
a popup with 2 panes, one on top and one on the bottom. If you have
admin access, open the "Path" variable. You going to want to add the
path to the GnuPG EXECUTABLE (not the keyrings, unless they're in the
same folder) at the end (make sure that you separate your addition
from the string before it with a semicolon [;]. look at the rest of
the "Path" variable to see an example of how they are separated). For
example this is my "Path" variable before the addition:
Notice the semicolons between them and the lack of spaces. This is
what mine looks like with the addition (just replace my GnuPG path
with whatever yours is):
Make sure that you do NOT put it in quotes (as we are used to doing in
the command prompt when a filename had spaces). What the "Path"
addition does is it tells the Windows Shell where to look for
executable files (like when you say "cmd" at the "run" dialog, it
looks in \windows\system32 for "cmd.exe"). So now when you type "gpg"
(no quotes) at the "run" dialog or from a cmd prompt, it will run
"gpg.exe." If you don't have administrator access to the computer, you
can just add a new variable named "PATH" in the top pane (user
variables). Just add the GnuPG exec path to that.
The second thing to do is add one last variable. This one doesn't
normally exist in Windows so you must create a new system (or user)
variable named "GNUPGHOME" (case-sensitive). The value for that
variable is going to be the directory of you GnuPG keyrings (i.e. my
GNUPGHOME variable's value is "d:\gnupg" (no quotes), as that is the
folder where my keyrings are).
Once those variables are changed/added, just "OK" out of the remaining
dialogs until System Properties is closed. You don't have to restart
P.S. the environmental variables override the registry settings, so
you don't have to worry about cleaning them up.
Zach Himsel <z.himsel at gmail.com>
PGP Public Key: http://zach-himsel.is.dreaming.org/
PGP Public Key ID: 0xFD04A326
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the Gnupg-users