CHOICE.exe – Windows CMD Command


Notice: A non well formed numeric value encountered in /home/future4tech/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118

Notice: A non well formed numeric value encountered in /home/future4tech/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119

Notice: A non well formed numeric value encountered in /home/future4tech/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118

Notice: A non well formed numeric value encountered in /home/future4tech/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119

Accept user input to a batch file. Choice allows single key-presses to be captured from the keyboard.

ERRORLEVEL will return the numerical offset of choice keys.
Choice.exe is a standard command in Windows 2003 and greater, it was first made available in the Windows XP resource kit.

CHOICE can be used to set a specific %errorlevel%
for example to set the %errorlevel% to 6 :
ECHO 6| CHOICE /C 123456 /N >NUL

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *