Generating/Exporting under another user-account(Log on as a batch job rights)

Henry Hertz Hobbit hhhobbit at
Fri May 17 16:43:07 CEST 2013

On 05/17/2013 12:57 PM, Lema KB wrote:
> hi all
> I have to generate a key-pair using another user-account (which is given
> right in local security settings to log on as a batch job) and export its
> public key.
> i did generate on windows cmd, but after i taped the passphrase, cmd window
> just dissappeared. and if i type to list keys, a window appears and closes
> immediately, so fast that i can't read what it writes.
> What would you suggest, ho can i see what it did and which keys it has
> under this another user?
> Any of your help is appreciated, thanks in advance.
> kiblema

Which version of GnuPG are you using?  If you are using
2.0.x just firing up Kleopatra shows all the keys on your
key ring.

If you are saying you are using a BAT file with GnuPG 1.4.x,
the cmd window only stays open while the BAT file is being
interpreted.  If you put this on the next to last code line
(I use setlocal at the start and endlocal):

REM I usually put a remark before it but pause prints own message

That will help you see the output of your various commands.  But
it will NOT help you if you want to see the keys or work with them
from the command line.  To do that, first make sure you add the
folder where gpg.exe or gpg2.exe is at to your %PATH%.  You may
need to logout and then log back in to get the GnuPG folder added
to the %PATH%.  Then go to Start, (All) Programs, Accessories,
and select cmd (or what ever it is named for you). In the command
window which now stays up (this is now assuming you are using

C:\> gpg --list-keys

That will let you know if the keys are there.  BTW, you are
STRONGLY encouraged to add the GnuPG home to your path.  It is
usually %ProgramFiles%\GNU\GnuPG  (but you MUST fill out
where %ProgramFiles% really is in the %PATH%) for GnuPG 2.x.
GnuPG 1.4.x may be in a different folder than GnuPG. My
machine that has both installed is turned off right now (heat

Did that help?


More information about the Gnupg-users mailing list