0

I have a Windows command line process with a verbose Y/N confirmation question. I would like the automatically put a "Y" response. I already tried to execute:

echo "y" | sdkmanager "platforms;android-14"
echo y | sdkmanager "platforms;android-14"

But this commands don't work as well. Does someone know how can I interact with this command automatically for users?

aschipfl
  • 33,626
  • 12
  • 54
  • 99
Jordan Ferr
  • 191
  • 2
  • 11
  • 2
    It looks ok, try without the space, incase it's the trailing space causing the issue `echo y| sdkmanager` – Bali C Apr 10 '17 at 14:32
  • 1
    It is possible that the program is not reading from `stdin`, but rather "insists" on reading from a keyboard. If that is true, redirecting from `stdin` will not work. – abelenky Apr 10 '17 at 14:42
  • 1
    You may try the [Sendkeys method](http://stackoverflow.com/questions/43292404/input-second-username-and-password-in-putty-using-batch/43292731#43292731)... – Aacini Apr 10 '17 at 15:34

0 Answers0