Automate Passphrase


I know decryption can be automated in windows with batch files, such as:

REM echo |gpg --passphrase-fd 0 -o -d

I also see that the program can be configured to automatically decrypt with a double click. However, this method seems to require manually typing in the passphrase.

Is there a known way to enter the passphrase such that a specific user can just doubleclick the target file and the program will automatically enter the passphrase?

I believe you can use a (secret) key without passphrase protection. That probably is the most simple solution.

The more involved solution would be to implement a special pinentry application that just enters the passphrase somehow. Note that this makes more sense for testing because if the password is saved on the machine you might not gain more security over the have-no-passphrase case above.