I'm looking for a way to accept user input for timeout in a batch file.
Basically, when the batch program starts, the user will have the option to input a timeout in minutes which will be calculated into seconds and passed as a variable until the next step proceeded.
Unfortunately I couldn't find anything on the web ;(
@echo off
REM set timeout by using the input of the user
shutdown -f -s -t (here comes in user input * 60)
Would something like this be possible with CMD?
set /pwill do what you want.set /pbut I couldn't understand it.set /p variable=promptwherepromptis what the script shows the user when it asks for input andvariableis the variable that the input gets stored in.