I have preset the passphrase in gpgagent but still it is prompting for password first time. Following are the steps i did.
installed gpg on windows from http