To the best of my knowledge, a .bat file automatically "presses enter" after each line. So your BAT file would be very simple, like this:
CODE
password1
password1
That would be the same as typing in "password1", then hitting enter, and again typing "password1".
If that method doesn't work, you might need Kana SendKey or a similar program. Kana SendKey sends keys to whichever program is open (it can send any key on a keyboard, including letters, and the ENTER button). Basically, it can simulate you typing buttons on the keyboard.
More info:
http://www.kanasolution.com/index.php?fid=...=2&utilid=5