|
Answer» What I need is a batch file that will give me a choice of three programs to start, and a choice to not start any of them. It then needs to give me a choice of several more programs, and exit after I've made this second choice. If possible it should let me press a number, e.g. press 1 for PROGRAM 1, 2 for program 2, 3 for program 3, 0 for no program, and then 1 for program 4, etc. Is this possible to do? Thanks in advance for any help or advice.This command is called choice Code: [Select]choice /c 1230 if %errorlevel% equ 1 start prog1
if %errorlevel% equ 2 start prog2
if %errorlevel% equ 3 start prog3
if %errorlevel% equ 4 GOTO A :A however if you have xp you have not this commandI should have mentioned I am using XP, is there an ALTERNATIVE to the choice command? Thanks for your help.Code: [Select]set /p choice= if '%choice%' equ '1' start prog1 etc but you must hit enter i can PM you and send you a choice.exe if you wantSorry for the inconvenience but I've sorted my problem a different way, without using batch files. Thanks for the help anyway though, it's APPRECIATED.
|