Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have to auto-send a yes input to my command prompt.
Usually it can be done just pressing y and my program can do it without any problem.

But.. if I run my program from a non English computer I need to press different key from y, so I'm trying to force an English command prompt.

How can I do it? I tried the chcp command but it just change the encoding, not the command prompt language

Any help is really appreciated, thank you!

share|improve this question
Which program/command is requesting the input? – Werner Henze Jun 5 '13 at 11:54
a particoular backup program, i need to automatize it by creating another program and now works but only if system language is english! Example: if that program runs from a italian machine it ask for the "S" key and i don't know how to get that "S" – HypeZ Jun 5 '13 at 13:11
That sounds challenging. A guess: the backup program might be loading the strings from a resource. So you could try to look at the resources in the backup program (or its DLLs). If you see a string that seems to match, you could try loading and sending it yourself. If you are only using the stuff in a controlled environment, you could check your current language and have a fixed map with languages and keys to send. – Werner Henze Jun 5 '13 at 13:35
Which backup program is this, and are you distributing it with your program? Also, are you looking to ensure that your program will run on all supported Windows languages? – Karan Jun 6 '13 at 1:17
solved, but using a different approach! Seems like you CAN'T change command prompt language, but you can get the default key for "yes" analyzing the user32.dll file! It exists from windows xp so compatibility is good :D Thank you all anyway! – HypeZ Jun 6 '13 at 9:23

You must log in to answer this question.

Browse other questions tagged .