I am running an .exe file in the command line from a Ruby script that asks the user for a Yes/No response. I would like to know how the user can interact with it in Windows environment.
I have tried all the possible options: system, backticks, %x(), Open3, Open4... and none of them work.
Some posts ([1], [2]) resolve the issue using PTY, but as to my knowledge there is no implementation of the PTY module in Windows. Any other idea?
pipe = IO.popen('your.exe', 'w+', :err => [:child, :out])and thenpipe.each_line do |line|and test for question, thenpipe.puts('Yes')finallypipe.closeIObefore, thanks!