Instead of doing a carriage return put a ^M at the end of your batch file.


On Wed, Apr 17, 2013 at 5:02 PM, Ken Cornetet <[email protected]>wrote:

> I’m going to guess that the application is reading the password from the
> console device instead of STDIN. I don’t think there is an easy way around
> that from a batch file. There may be some third-party utilities that can
> stuff keystrokes into the console buffer.****
>
> ** **
>
> I’d have a look at AutoIt. ****
>
> ** **
>
> *From:* [email protected] [mailto:[email protected]]
> *Sent:* Wednesday, April 17, 2013 4:29 PM
>
> *To:* NT System Admin Issues
> *Subject:* Re: Can you do this with .CMD?****
>
> ** **
>
> You could certainly do it in VBScript, I reckon, which XP should deal with.
> ****
>
> Sent from my Blackberry, which may be an antique but delivers email
> RELIABLY****
> ------------------------------
>
> *From: *David Lum <[email protected]> ****
>
> *Date: *Wed, 17 Apr 2013 20:23:23 +0000****
>
> *To: *NT System Admin Issues<[email protected]>****
>
> *ReplyTo: *"NT System Admin Issues" <[email protected]
> >****
>
> *Subject: *Can you do this with .CMD?****
>
> ** **
>
> Use a batch file to launch an application and then send two carriage
> returns to this app? I can do one, but not two. Running the program is asks
> for username (hitting ENTER it uses a default, which is desired), then when
> you hit <CR> it asks for a password.****
>
> ** **
>
> My batch file looks like this:****
>
> programtorun < c:\windows\temp\answerfile.txt****
>
> ** **
>
> Answerfile.txt contains ****
>
> <carriage return>****
>
> Password <carriage return>****
>
> ** **
>
> The app runs but sits and waits for the password, so it’s only
> processesing the first <CR>. Surely this is a simple one? Some pipe
> command? Maybe I should get out my old DOS 5.0 book…****
>
> ** **
>
> Please, no PoSh because I have tons of XP machines that need to run this…*
> ***
>
> *David Lum*
> Sr. Systems Engineer // NWEATM
> Office 503.548.5229 //* *Cell (voice/text) 503.267.9764****
>
> ** **
>
> ~ Finally, powerful endpoint security that ISN'T a resource hog! ~
> ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~
>
> ---
> To manage subscriptions click here:
> http://lyris.sunbelt-software.com/read/my_forums/
> or send an email to [email protected]
> with the body: unsubscribe ntsysadmin****
>
> ~ Finally, powerful endpoint security that ISN'T a resource hog! ~
> ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~
>
> ---
> To manage subscriptions click here:
> http://lyris.sunbelt-software.com/read/my_forums/
> or send an email to [email protected]
> with the body: unsubscribe ntsysadmin****
>
> ~ Finally, powerful endpoint security that ISN'T a resource hog! ~
> ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~
>
> ---
> To manage subscriptions click here:
> http://lyris.sunbelt-software.com/read/my_forums/
> or send an email to [email protected]
> with the body: unsubscribe ntsysadmin
>



-- 
Daniel Rodriguez
[email protected]

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to [email protected]
with the body: unsubscribe ntsysadmin

Reply via email to