Q. I have a command that I'm trying to automate that requires a key to be pressed. What can I do?

A. The easiest way to handle commands that require user input and don't support command line switches is to simply pipe the required character to the command. For example, if I need to press y, I could do the following:

cmd /c call ECHO Y | command.exe
Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish