Decyrption via scheduled task fails

Neal Dudley neal.dudley at
Thu Mar 20 18:56:31 CET 2008

I would think we should keep this in the list, such that other people
with a similar issue can search the list archives and find this answer.
 And so others know whether or not it *is* resolved in the end.  Hope
you don't mind me posting it back to the list.

If you try your commands directly from the command line, what happens?
Does it complain about syntax? Does it work and produce a log file?

Try this:
1. Check the working directory of the scheduled task. Make sure it is
set to the folder where the encrypted files are located.  Perhaps it is
working and just writing everything out to the working directory?

2. Change the job to use full paths for the executables, and redirect
the output to a file:
echo SECRETPASSPHRASE | C:\path-to-WinPT\gpg --passphrase-fd 0
--decrypt-files C:\path-to-files\*.pgp --logger-file gpg_logfile.txt >

Personally, I would leave the --logger-file directive in there even
after everything is working properly.  That way if there is ever a
question in the future, you'll at least have the log to verify what
occurred.  Once it is working, add a line to be beginning of the script
to remove the previous day's log file.

Dorroh, Brian wrote:
> Sorry to reply directly to you, but I didn't think anyone else would
> be interested in this part. I tried adding the --logger-file tag to
> the command, but it doesn't seem to work. This is what my pgp.bat
> file looks like:
> "echo SECRETPASSPHRASE|gpg --passphrase-fd 0 --decrypt-files
> c:\path-to-files\*.pgp --logger-file pgp.txt"
> We've specified "*.pgp" instead of "filename".pgp because each day a
> new file is placed in that directory with a different, long name.
> This was the only way I found to automate the process. But
> regardless, nothing gets logged.
> -----Original Message----- From: Neal Dudley
> [mailto:neal.dudley at] Sent: Thursday, March 20, 2008 7:55
> AM To: Dorroh, Brian Subject: Re: Decyrption via scheduled task fails
> Try adding "--logger-file logfilename" to the command.  This should 
> produce a log file named "logfilename", which should give us some
> clues as to what is going on here.
> I would guess that GnuPG is expecting a passphrase for the private
> key for decryption.  Are you using gpg-agent?  Another thing to check
> is environment variables, as gpg-agent sets three of them.  (At least
> in a *nix environment it does.)
> Can you rerun the job with the --logger-file, and post the log file?
> bdorroh wrote:
>> I'm using v1.4.8 for Windows. I've have a batch file setup to
>> decrypt
> a file
>> and then to move the decrypted file to another location for further
>>  processing. I can successfully decrypt the file by double-clicking
>> my
> batch
>> file. But when I setup a scheduled task to run it, the decryption
> fails. I
>> can confirm that the scheduled task is executing, but I can't
>> figure
> out why
>> the decryption fails as a task. Obviously, I can't see the output.
>> I've tried outputting the results to a file, but it only shows the
> command
>> executed and not what actually appears on the screen when run
> manually.
>> Also, i do have the path to GNU set in the windows path statement.
>> Any ideas here? I'm really stuck. -- View this message in context:
>  44724.html
>> Sent from the GnuPG - User mailing list archive at
>> _______________________________________________ Gnupg-users mailing
>> list Gnupg-users at 
> This message (including any attachments) may contain confidential or 
> otherwise privileged information and is intended only for the 
> individual(s) to which it is addressed. If you are not the named 
> addressee you should not disseminate, distribute or copy this e-mail.
>  Please notify the sender immediately by e-mail if you have received
> this e-mail by mistake and delete this e-mail from your system.
> E-mail transmission cannot be guaranteed to be secured or error-free
> as information could be intercepted, corrupted, lost, destroyed,
> arrive late or incomplete, or contain viruses. The sender therefore
> does not accept liability for any errors or omissions in the contents
> of this message or that arise as a result of e-mail transmission.  If
>  verification is required please request a hard-copy version from the
> sender.
> SOURCECORP, Incorporated

More information about the Gnupg-users mailing list