Info: Choice Command Is Modified In Windows Vista PDF Print E-mail
Monday, 17 September 2007

Utility Name: Choice

Status: Modified in Windows Vista

Description:

The Choice commnand allows user input during batch file execution, based on the user input, the batch file may change its execution. The Windows Vista versions of the choice command does not add or change any command options. The difference is in the way that the commands are typed.
While the new syntax makes the commands easier to read, it will break batch files that rely on older versions of Choice. These batch files will be need to be modified to run on Windows Vista. The new syntax is:
CHOICE [/C choices] [/N] [/CS] [/T timeout /D choice] [/M text]
Therefore, a Choice command written pre-Windows Vista would look like this;
CHOICE /C:1234 /N /T:2,5 Please choose a menu option.
This command would now be rewritten as;
CHOICE /C 1234 /N /T 2,5 /D Please choose a menu option.
  • Using the /CS switch allows the user commands to be case sensitive, allowing an additional 26 options.
  • Using /T does not function as a default value and a timeout value. An additional option must be specified using the /D switch. The /M switch must be used to provide additional text.
  • Two alternatives to the Choice coammand are provided, Timeout and Waitfor.
No Comments.

Discuss...

Marcus Walshe
About the author:
This is a test entry, full details following shortly.
Last Updated ( Monday, 17 September 2007 )
 
< Prev   Next >

Who's Online

We have 3 guests online