中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-05 15:42
48,039 topics / 350,124 posts / today 2 new / 48,251 members
DOS批处理 & 脚本技术(批处理室) » [Help] Why doesn't my choice work
Printable Version  748 / 3
Floor1 icyheart Posted 2007-08-22 10:27
中级用户 Posts 81 Credits 216
@echo off
cls
echo.
echo A Microsoft Editor
echo B Microsoft Anti-Virus
echo C Microsoft Backup
echo.
choice /c:abc Choose an option
if errorlevel 3 goto MSBackup
if errorlevel 2 goto Msav
if errorlevel 1 goto Edit
:Edit
edit
goto End
:Msav
msav
goto End
:Msbackup
msbackup
goto End
:End
Why does my choice never work

Attachments
a.jpg (23.85 KiB)
Floor2 zerocq Posted 2007-08-22 10:44
中级用户 Posts 196 Credits 458
XP doesn't come with choice.exe
Floor3 icyheart Posted 2007-08-22 11:20
中级用户 Posts 81 Credits 216
So does that mean my machine can't use choice then?
Floor4 halulove Posted 2007-08-22 12:23
初级用户 Posts 19 Credits 43
Use set /P instead of choice
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023