Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: how to avoid pop up box for password in windows batch script  (Read 3376 times)

0 Members and 1 Guest are viewing this topic.

dhangyesatish

    Topic Starter


    Newbie

    • Experience: Familiar
    • OS: Windows 7
    how to avoid pop up box for password in windows batch script
    « on: September 13, 2017, 10:53:59 AM »
    I am trying to encrypt and decrypt a file using a gpg software using batch script. Every thing goes fine for encryption but when i try to decrypt it prompts for password which comes as a message box but i want to avoid this because this script has to be called in some other application and we cannot automate this unless we provide the password in actual script itself. Can some one help me in this regards.

    Squashman



      Specialist
    • Thanked: 134
    • Experience: Experienced
    • OS: Other
    Re: how to avoid pop up box for password in windows batch script
    « Reply #1 on: September 13, 2017, 12:32:04 PM »
    GPG has a passphrase option.
    This is how I decrypt using gpg
    Code: [Select]
    gpg.exe --batch --passphrase Password -o  "Outputfile.txt" --decrypt "Input.gpg"

    dhangyesatish

      Topic Starter


      Newbie

      • Experience: Familiar
      • OS: Windows 7
      Re: how to avoid pop up box for password in windows batch script
      « Reply #2 on: September 13, 2017, 01:11:33 PM »
      Thanks a lot Squashman, this worked for me.