Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DOS choice batch command on Windows 2000 and higher (with default and timeout)

Pretty much explained in the topic - need a replacement for choice which can accept a default value and a timeout. SET /P doesn't cut it, unfortunately. Scripts are to be run in WinPE, so vbscript with IE is also out of question.

like image 669
Baczek Avatar asked Nov 05 '22 08:11

Baczek


1 Answers

You can add the variable name to get in the User Variable or System variable list in the Environment Variable of the system. When running in WinPE, there won't be an option like a prompt to get the user input even if SET/P is used. So you can manually change the value in the User variable to the option that you need to run, which will automatically included as the default option.

like image 118
Legendary Genius Avatar answered Nov 09 '22 06:11

Legendary Genius