GPG detection on Windows?
Werner Koch
wk at gnupg.org
Fri Jul 19 12:28:12 CEST 2013
On Thu, 18 Jul 2013 19:15, anthony at cajuntechie.org said:
> I'm designing an application that will run on Windows and utilize
> GNUPG. Right now, I'm detecting if GPG is installed by calling it then
> parsing the output of the command to see if it succeeded or failed.
> This is VERY messy and not my preferred way.
That is actually the thing you can do.
> Does GPG4Win install anything to the registry that I could check for
> to see if it's installed?
We try to avoid the registry and the forthcoming version will even allow
to act as a “portable” version thereby entirely ignoring the registry.
The suggested way to detect gpg is by calling "gpgconf", which returns
an easily parsable list telling the file names of the actual binaries.
OR you may call "gpgconf --list-dirs" to get a list with information on
the installation directories. If a registry key has been used to
redirect the standard locations, gpgconf knows about it. Thus please
use it. gpgconf is expected to be in the PATH (as is gpg).
An even better way is to make use of the gpgme dll, which is the
suggested API to gpg.
Salam-Shalom,
Werner
--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.
More information about the Gnupg-users
mailing list