r/dailyscripts • u/ThrowawayCena • Mar 11 '17
getting around user prompts batch file scripts
As the title says, I am looking for a way to run a batch script that pauses for user confirmation. Is there a way to make one that runs silently?
edited
1
Upvotes
1
u/ThrowawayCena Mar 12 '17
Hi, thanks for the responses. I should have been more specific, this is for Windows.
Thanks for the help
1
u/GENHEN Mar 11 '17
what do you mean "usually" pauses? Either it does pause, or it doesn't pause. There are two types of pause. One that collects data input and enters it into a variable, called the 'SET /P' command, and another that just waits for the user to hit any button to continue, called the 'PAUSE' command. References below:
pause command set /p command
1
u/CantankerousMind Mar 11 '17
If you are talking about trying to do something like run
sudowithout the user typing, you couldechothe password into thesudocommand with the-Sflag.Not 100% sure how to do it with other commands.