Newbie question - how to include the passphrase in the command

Ping Kam pkam@quikcard.com
Thu Jun 5 01:24:02 2003


Hi:

I use the gen-key command to create a key, and then I import a key that is
export by our client.

This is the command I use to encrypt a file to our client :
gpg -o OutputFilename -a -r MyUserID --encrypt-to
RecipientUserID --passphrase MyPassword -es SourceFile

But I always got the following message
Reading passphrase from file descriptor 0 ...

when I entered the passphrase, then it creates the file and display the
following message

You need a passphrase to unlock the secret key for
user: "QSI2NSCS (QSI to NSCS user account)"
1024-bit DSA key, ID CB031107, created 2002-05-14

If I leave out the passphrase, gpg will display the same message and prompt
me for the passphrase.

You need a passphrase to unlock the secret key for
user: "QSI2NSCS (QSI to NSCS user account)"
1024-bit DSA key, ID CB031107, created 2002-05-14

Enter passphrase:

After I enter the passphrase, then the file is created.  But this time the
passphrase I entered is not echo back to the screen.

How can I use the passphrase in the command line so it will not prompt me
for the passphrase?  I want to put this into a cmd or batch file then I can
call it from a windows application and passing the values throught the
parameters.

Thanks,
Ping Kam