Batch script GPG encryption automation

October 21, 2011 at 03:19:47
Specs: Windows Server 2008, 8GB
Batch script GPG encryption automation

Dear All,

Really need help on the issue below:

I tried to create a bat file with command below and it is working fine..

But when I run it from a windows service, then it cannot work, no response at all..
The windows service is running as Local System Account with interact with desktop enabled.

SETLOCAL
PATH=C:\Program Files (x86)\GNU\GnuPG;%PATH%
>"%TMP%\~encryptlist.txt" DIR /B "C:\outgoingdropfolder"
PUSHD "C:\outgoingdropfolder"
FOR /F "delims=" %%F IN ('MORE ^< "%TMP%\~encryptlist.txt"') DO (
IF EXIST %%F (
ECHO password| GPG --batch -se --passphrase-fd 0 -r PGPTOKEY -o "C:\encryptedfiles\%%F.pgp" %%F
IF ERRORLEVEL == 0 DEL "%%F"
)
)
POPD
DEL "%TMP%\~encryptlist.txt"
ENDLOCAL



See More: Batch script GPG encryption automation

Report •

#1
October 21, 2011 at 12:59:23
How are you running it as a service?

How To Ask Questions The Smart Way


Report •
Related Solutions


Ask Question