China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-23 06:54
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » 请问这个带有选择项的批处理是怎么样实现的 请问这个带有选择项的批处理是怎么样实现的 请问这个带有选择项的批处理是怎么样实现的 What is the way to implement this batch processing with options? What is the way to implement this batch processing with options? What is the way to implement this batch processing with options? View 3,626 Replies 35
Floor 31 Posted 2006-11-03 08:03 ·  中国 上海 松江区 电信
铂金会员
★★★★
DOS一根葱
Credits 5,493
Posts 2,315
Joined 2006-05-01 10:41
20-year member
UID 54766
Gender Male
From 上海
Status Offline
It seems that everyone has confused. The building owner should be talking about pure DOS mode. The building owner can switch to Wbat 2.50, which is universal for DOS and XP, but it just doesn't support the 936 code page.
http://home.mnet-online.de/horst.muc/
第一高手 第二高手

Floor 32 Posted 2006-11-03 10:08 ·  中国 福建 泉州 晋江市 电信
初级用户
Credits 97
Posts 40
Joined 2006-11-01 13:59
19-year member
UID 69168
Gender Male
Status Offline
Thanks to everyone above. Passed safely. Deleted some parameters and changed some variables, don't know why.

CHOICE.com /C:1234
IF ERRORLEVEL 1 GOTO RESTORE
IF ERRORLEVEL 2 GOTO SUPPRESS
IF ERRORLEVEL 3 GOTO DISABLE
IF ERRORLEVEL 4 GOTO restort
Floor 33 Posted 2006-11-03 11:09 ·  中国 上海 松江区 电信
铂金会员
★★★★
DOS一根葱
Credits 5,493
Posts 2,315
Joined 2006-05-01 10:41
20-year member
UID 54766
Gender Male
From 上海
Status Offline
It's really strange. I've always used the parameters IF ERRORLEVEL 1 IF NOT ERRORLEVEL 2, with the numbers arranged from small to large. The code above should be from large to small.
CHOICE.com /C:1234
IF ERRORLEVEL 4 GOTO RESTORE
IF ERRORLEVEL 3 GOTO SUPPRESS
IF ERRORLEVEL 2 GOTO DISABLE
IF ERRORLEVEL 1 GOTO restort
第一高手 第二高手

Floor 34 Posted 2006-11-03 13:14 ·  中国 福建 泉州 晋江市 电信
初级用户
Credits 97
Posts 40
Joined 2006-11-01 13:59
19-year member
UID 69168
Gender Male
Status Offline
At the very beginning, I also arranged them from largest to smallest, but there was an error in the VM. It gives two to three and three to two (I deliberately added an extra pause and a number in each command group of the batch file on the 20th floor just to see this). From smallest to largest, it gives as many as needed. I can only collect all the software in two days and then burn it to a disc to test on the actual machine to confirm.
Floor 35 Posted 2006-11-04 03:34 ·  中国 北京 中移铁通
初级用户
Credits 28
Posts 14
Joined 2006-08-16 14:31
19-year member
UID 60645
Status Offline
Originally posted by lxmxn at 2006-11-3 06:23:

  The above regarding environment variables has two points that need correction:

  These two are duplicated, one of which is "%PROCESSOR_REVISION%"----System-----Returns ...

Thanks for the correction. This was copied from the XP Help and Support Center. I didn't look too closely
Floor 36 Posted 2007-04-24 02:23 ·  中国 河南 郑州 电信
新手上路
Credits 9
Posts 5
Joined 2007-04-24 01:32
19-year member
UID 86226
Gender Male
From 郑州
Status Offline
Learning
Forum Jump: