S.gpg-agent Error

I am using a batch file to decyrpt a file. When I run it I get an error saying something like unable to connect to path\S.gpg-agent and then I get a popup asking me to manually type the passphrase into a box.

I would like to know how to make the batch file run without the error.

I am runing this on a Windows 2008 machine and my batch file starts like this…

type path\to\passphrase | ect…

Thanks for any help