Is there a gpgkeys_mailto for Win32?

Zuxy zuxy.meng at
Wed Dec 29 06:06:52 CET 2004

Thanks for your reply.

On Tue, 28 Dec 2004 23:14:52 -0500, David Shaw <dshaw at> wrote:
> This is intentional.  Unlike the unix-ish system(), win32 system()
> returns immediately to the calling process and does not wait for the
> spawned process to exit.  This does not work for GnuPG since we need
> to know when the child process exited and what its return code was.
> Hence the CreateProcess call.

CreateProcess is stupid. It must know the module (perl.exe) name and
the exact path to gpgkeys_mailto.

Does windows' system() really return immediately? I searched MSDN and
found nothing about it. I wrote a short piece of code and it seems
taht system() returns the error code after the child process finishes,

> I'm not against it, but not that interested in writing it myself ;)
> The mailto keyserver helper has always been a bit of a lower
> priority.  I was surprised to see your mail, actually.  I didn't think
> anyone was using it.
> Anyone have any ideas on this one?  Is there some win32 shell magic
> that can be used to associate gpgkeys_mailto with a perl interpreter?

If system() works, register the .PL suffix (usually done during the
perl installation), add .PL to $PATHEXT, rename gpgkeys_mailto to, then system("gpgkeys_mailto") will work.

If system() doesn't work, we have to write something like
CreateProcess(NULL, "perl -w \\GPG\\gpgkeys_mailto") if perl is in

> > or (the most native way)
> > 3. write a .WSH file, and replace "sendmail" with a mailto url therein.
> I'd like more information about this.  Can you give me a pointer?
> David
.WSH (Windows Script Host) is supported natively by Win32. Its syntax
can be Java-like or VB-like. Detailed infomation can be found on MSDN
(under Web Developement->Scripting->Microsoft Script Technologies). A
mailto url is something like
"mailto:someone at PGP PUBLIC
KEY BLOCK-----%0A%0DVersion:...."

Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6

More information about the Gnupg-users mailing list