Reputation: 3160
I am using oracle wallet to store the oracle database passwords, the batch file to create the wallet asks for password when you run it. is there any way to modify the batch file , and provide the password before hand
so that i can avoid inputtting the password every time i run that.
so to generalize the problem, is there any way i can write to input stream of another program.
so that i can avoid prompts from my automation scripts.
Upvotes: 0
Views: 278
Reputation: 3160
Enter the password in a text file like password.txt
and you can run like
myprogram.exe < password.txt
if the program accepts two inputs then type the second input in the second line of the text file.
Upvotes: 0
Reputation: 156
You can use the pipe operator "|" to redirect the standard output stream of one program into the input stream of another. I works both on unix and windows platforms.
In your example you would have a script doing just
echo mypassword
and you would run this from the command line:
myscript | wallet
I assume that your script would be called myscript.bat, and the wallet program wallet.exe, change these accordingly.
Upvotes: 2