w32 installation paths (was: OK,
here goes trouble... re c:\gnupg)
Johan Wevers
johanw at vulcan.xs4all.nl
Tue Nov 9 21:06:19 CET 2004
Werner Koch wrote:
>So what you are saying is that we should not use the registry to
>locate the home directory but to use an environment variable instead.
I think so. On Win2000, "My Documents" is a default homedir, and is also
a different physical directory for each user like the Unix homedir. A
default like \My Documents\.gnupg would be usable on NT4, Win2000 and XP.
For win98 I'm not sure if this works the same.
>Does that mean we should add a key AppPath to the registry entry for
>GnuPG, like:
>
> [HKEY_LOCAL_MACHINE\Software\GNU\GNUPG]
> "HomeDir"="C:\\GnuPG"
> "gpgProgram"="C:\\GnuPG\\gpg.exe"
> "AppPath"="C"\\GnuPG\\"
This could be very usable for graphical shells that want to use gpg, so
they can locate the binary easily.
>1. Installation:
>
> gpg and the other other executables should be installed in
> %ProgramFiles%\GNU\GnuPG\ unless an existing gpg.exe has been
> found or the user requested a different directory.
>
> A Registry entry
>
> [HKEY_LOCAL_MACHINE\Software\GNU\GNUPG]
> "gpgProgram"="%ProgramFiles%\\GNU=GnuPG\\gpg.exe"
> "AppPath"="%ProgramFiles%\\GNU\\GnuPG\\"
>
> will be created. The question is whether %ProgramFile% is to be
> sued or the expanded value. IRIC, W98 does not support the
> expansion.
>
> Question: Just entering "gpg" on the command line won't work then
> becuase it is not listed in the PATH environment variable. What
> the usual way to fix this?
To look for a previous installed version? I think that most programs just
check some registry entries like the gpgProgram. However, this can require
some heuristics like checking the old default C:\gnupg, or even a filesearch
for gpg.exe.
>Any comments?
There is one consideration I've seen more in this thread: some people, like
me, want to carry gpg on removable media (a CDR in my case), to a computer
at work. I don't want to store my secret keyring there locally. Sometimes
users there have no rights to change the registry, and it would be nice to
a able to run gpg from CDR or memory stick without requiring any changes
to the local system. With the environment variables this is possible, just
start gpg with a batchfile that sets the env first.
And about the remarks I read about locating the executable's starting path:
I've found that this depends on the compiler. With Borland C++ Builder,
argv[0] contains the full path and executable name. With Microsoft C++,
you just get the first argument typed in on the command line. So when I type
"gpg", MS argv[0] = "gpg", while Borlands would be (for example)
"C:\\Program Files\\GNU\\gnupg\\gpg.exe".
--
ir. J.C.A. Wevers // Physics and science fiction site:
johanw at vulcan.xs4all.nl // http://www.xs4all.nl/~johanw/index.html
PGP/GPG public keys at http://www.xs4all.nl/~johanw/pgpkeys.html
More information about the Gnupg-users
mailing list