See the
???Using Variable Substitution??? section of the chapter for details on using this technique.
Using the Choice Command
The Choice command lets you add interactive processing to batch files. Whether you use this
option depends on the kind of automation you want to add to your processing tasks. Most of the
automation you create for optimization tasks won??™t require any kind of interactivity because you
already know how you want the task performed based on experience you obtained performing the
task manually. However, sometimes you do need to add some interactivity. For example, you might
run the command one way on Friday and a different way the rest of the week. The Choice command
can also help you add safeguards that ensure the user understands the ramifications of performing
a certain task before they actually do it. Vista and Server Core change the Choice command significantly,
breaking many batch files. The Vista and Server Core form of the Choice command differs
not in arguments, but in how you combine those arguments at the command line. Here??™s the command
line for Vista and Server Core:
CHOICE [/C choices] [/N] [/CS] [/T timeout /D choice] [/M text]
The changes make the command clearer, but they break existing batch files in a way that you
can??™t easily fix.
Pages:
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371