X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.3 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org In-Reply-To: <4C7FC3B4.1060606@cygwin.com> References: <20100902074703 DOT GA11464 AT gaston DOT couberia DOT bzh> <4C7FC3B4 DOT 1060606 AT cygwin DOT com> To: cygwin AT cygwin DOT com MIME-Version: 1.0 Subject: Re: simulating console input X-KeepSent: 908B5DCD:CC6A54F1-85257792:0074780B; type=4; name=$KeepSent Message-ID: From: RISINGP1 AT nationwide DOT com Date: Thu, 2 Sep 2010 17:17:18 -0400 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com >On 9/2/2010 3:47 AM, Peter M=FCnster wrote: >> Hello, >> >> I would like to run a Dos program, that needs keyboard input (just one= =20 "Y"), >> automatically via "make" in an ssh-session. >> >> How could I simulate the "Y" keypress? >> >> "echo Y | DosProgram.exe" does not work... >> >> The keypress is accepted only in a dos-console. > >Read < http://cygwin.com/cygwin-ug-net/using-effectively.html#using-console>. >Then add this fact - the SSH server uses ptys. So your program will not >work with a single character put in the input buffer. One could >envision using 'yes' to fill the buffer of the pipe that the Windows=20 program >interprets the pty to be. Perhaps a nicer alternative is to build the >problematic program with Cygwin, if that's an option, so that it will >understand the pty. Would an inline document work? DosProgram.exe <