1.

Solve : Batch File - automated password input?

Answer»

Hi,

I WANT to create a batch file for starting commands to encrypt a file. Therefore it is necessary to type in a password. This process should be automated.

Example:

C:\GnuPG\gpg -d c:\File\test.txt.gpg

This command line INPUT above is responsible for decrypting a file with the program "GnuPG", wich is an OpenSource tool.
The problem is, that this command WANTS the user to type in a password that was created some steps before. If the password isn't typed in, the file cannot be decrypted.

The password input should be automated, so the user mustn't type the password in.
GnuPG doesn't offer a command which avoids the password input.

Is there a pssibility to avoid typing in the password?It would help if you would explain what you would do if there were no batch file and in terms of that explain what you want the batch file to do.

Mac

Example

To encrypt, I do this
c:\util\ZCrypto MyStuff.txt MyStuff.zzz Mo33jkt
erase MyStuff.txt

This will encrypt MyStuff.txt USING password Mo33jkt and put the result into MyStuff.zzz.

That is too much to type, so I want a batch file to do that. But I don't want to hard-code the password into my batch file as that is a security violation.

What can I do?

======== answer, if that is your question
Your BAT file, zC.bat
Code: [Select]c:\util\ZCrypto MyStuff.txt MyStuff.zzz %1
erase MyStuff.txt
and to encrypt a file, you would enter this at the prompt: Code: [Select]ZC Mo33jkt Quote

Hi,

I want to create a batch file for starting commands to encrypt a file. Therefore it is necessary to type in a password. This process should be automated.
So, is there a command that fills in the password AUTOMATICALLY?
you zipping program should have command options you can use to input password. check with manual of your zip program


Discussion

No Comment Found