[Gpg4win-users-en] Help with ActivePerl and Task Scheduler
Scott Stansbury
sstansbury at aol.com
Mon Apr 23 19:12:31 CEST 2012
Greetings.
I could use a pointer on getting a script to work under Windows Task Scheduler.
ActivePerl 5.14
Gpg4win 2.1.0
Windows Server 2008 R2
The script works flawlessly from the command line, but will not run under Task Scheduler. Task Scheduler reports that it ran successfully...
Script:
BEGIN {
use Win32 qw( SW_HIDE );
Win32::SetChildShowWindow( SW_HIDE );
}
use strict;
use warnings;
my $log = "decrypt.log";
close ( STDOUT );
open ( STDOUT, ">>$log" );
close (STDERR );
open (STDERR, ">>$log" );
# The below are commented out as I am entering them directly on the command line for troubleshooting purposes.
# my $data_file = "TEST_FILE.txt.pgp";
# my $incoming_dir = "C:\\Users\\Public\\TEST\\Incoming";
# my $data = "C:\\Users\\Public\\TEST\\Incoming\\TEST_FILE.txt.pgp";
# my $output_file = $data_file;
# $output_file =~ s/\.pgp//;
# my $data_dir = "C:\\Users\\Public\\TEST\\Data";
# my $output = "C:\\Users\\Public\\TEST\\Data\\TEST_FILE.txt";
# my $sec_keyring = "C:\\Users\\Administrator\\AppData\\Roaming\\gnupg\\secring.gpg";
# my $pub_keyring = "C:\\Users\\Administrator\\AppData\\Roaming\\gnupg\\pubring.gpg";
system ( "gpg2.exe --batch --yes --passphrase-fd 0 --output C:\\Users\\Public\\TEST\\Data\\TEST_FILE.txt --no-default-keyring --keyring C:\\Users\\Administrator\\AppData\\Roaming\\gnupg\\pubring.gpg --secret-keyring C:\\Users\\Administrator\\AppData\\Roaming\\gnupg\\secring.gpg --exit-on-status-write-error --decrypt C:\\Users\\Public\\TEST\\Incoming\\TEST_FILE.txt.pgp < passphrase.txt" );
Would truly appreciate any insight or pointers...
Scott...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wald.intevation.org/pipermail/gpg4win-users-en/attachments/20120423/3e8e298a/attachment.html>
More information about the Gpg4win-users-en
mailing list