1

I have a batch script (mine) that launches another batch script (theirs). Their batch script queries user input as part of the process, and I do not have access to modify it.

I need to suppress their batch script from querying input, meaning that when their batch script outputs: Press enter for step 2..., I want the user to be unable to interact with the script using their keyboard, hence the script should look like it's frozen.

How do I call their script from my script in such a way that the user is unable to interact with the input requests of their script?

MathuSum Mut
  • 2,765
  • 3
  • 27
  • 59

1 Answers1

3

Actually summing up the comments to make this not an unanswered question. You can try using the | (pipe) operator:

echo Haha! You will not be able to press any key!! | their.bat

Which will redirect STDOUT (Standard Out) of command echo Haha! You will not be able to press any key!! (Haha! You will not be able to press any key!!) to STDIN (Standard Input) of command theirs.bat.

Or, even read from nul:

their.bat < nul

I recommend reading https://ss64.com/nt/syntax-redirection.html and What does "&&" in this batch file? (second answer is better here.).

double-beep
  • 5,031
  • 17
  • 33
  • 41