I want to make a batch file for starting multiple programs. For example, pressing 1 starts QQ, pressing 2 starts IE, pressing 3 starts BT, and pressing Enter exits the command window. I plan to use the Start and GOTO commands to implement it. Please teach me experts: How can I wait and judge the keyboard input??
----------------------------------------------------------------------
『Post 5』: Please help me see where is wrong, why is there no response under xp?
@ echo 1. Start QQ-1
@ echo 2. Start BT download
@ echo 3. Start Maxthon browser
@ echo 4. Start QQ-2
@ echo 0. Exit
choice /c 12340 /m "Please select the program code you need to start:"
if errorlevel 5 goto end
if errorlevel 4 goto qq2
if errorlevel 3 goto myie
if errorlevel 2 goto bt
if errorlevel 1 goto qq1
:qq2
start D:\Progra~1\Tencent\qq1\CoralQQ.exe
:myie
start D:\Maxthon\Maxthon.exe
:bt
start D:\Progra~1\BitComet\BitComet.exe
:qq1
start D:\Progra~1\Tencent\qq\CoralQQ.exe
:end
exit
[ Last edited by cjw114 on 2005-11-12 at 00:34 ]
----------------------------------------------------------------------
『Post 5』: Please help me see where is wrong, why is there no response under xp?
@ echo 1. Start QQ-1
@ echo 2. Start BT download
@ echo 3. Start Maxthon browser
@ echo 4. Start QQ-2
@ echo 0. Exit
choice /c 12340 /m "Please select the program code you need to start:"
if errorlevel 5 goto end
if errorlevel 4 goto qq2
if errorlevel 3 goto myie
if errorlevel 2 goto bt
if errorlevel 1 goto qq1
:qq2
start D:\Progra~1\Tencent\qq1\CoralQQ.exe
:myie
start D:\Maxthon\Maxthon.exe
:bt
start D:\Progra~1\BitComet\BitComet.exe
:qq1
start D:\Progra~1\Tencent\qq\CoralQQ.exe
:end
exit
[ Last edited by cjw114 on 2005-11-12 at 00:34 ]

