Thanks, we find the solution with help of an user (Lee Elcocks), the problem was to write an space between password and pipe. Echo "mypasswd"| gpg.exe ...... use it without space between "mypasswd" and |
Thanks for your effort, Werner, we're using the first one (only had to remove empty space on the .bat) but your solution seems ok too. Regards. Gabi. -----Mensaje original----- De: Werner Koch [mailto:w...@gnupg.org] Enviado el: jueves, 18 de octubre de 2012 10:39 Para: Gabi CC: 'David Tomaschik'; gnupg-users@gnupg.org Asunto: Re: Problem trying to automate decrypt option On Thu, 18 Oct 2012 08:34, g...@idieikon.com said: > If I write gpg2.exe --help (or gpg.exe --help) the command or option > --passphrase is not shown anywhere. Note that --help does not show all options. See the man page for a complete list. > I'm using windows version. Is that a feature not available in windows > version? It is the same on all platforms. What you need to use is the command gpg-preset-passphrase to tell the gpg-agent the passphrase in advance. gpg-preset-passphrase [options] [command] keygrip The gpg-preset-passphrase is a utility to seed the internal cache of a running gpg-agent with passphrases. It is mainly useful for unattended machines, where the usual pinentry tool may not be used and the passphrases for the to be used keys are given at machine startup. Passphrases set with this utility don't expire unless the --forget option is used to explicitly clear them from the cache --- or gpg-agent is either restarted or reloaded (by sending a SIGHUP to it). It is necessary to allow this passphrase presetting by starting gpg-agent with the --allow- preset-passphrase. gpg-preset-passphrase is invoked this way: gpg-preset-passphrase [options] [command] keygrip keygrip is a 40 character string of hexadecimal characters identifying the key for which the passphrase should be set or cleared. This keygrip is listed along with the key when running the command: gpgsm --dump-secret-keys. One of the following command options must be given: [...] For use with gpg you can use gpg2 --with-keygrip -K to view the keygrip. Salam-Shalom, Werner -- Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz. _______________________________________________ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users