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-07-31 19:48
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » Can someone help explain what these specific DOS programming commands do? View 2,153 Replies 2
Original Poster Posted 2002-11-11 00:00 ·  中国 广东 广州 联通
初级用户
Credits 229
Posts 37
Joined 2002-11-09 00:00
23-year member
UID 207
Gender Male
Status Offline
The following is a way to choose which driver to load. Could the experts please help me annotate what each command does? Because I'm just a newbie. . .

@ECHO OFF
goto start
:w_menu

UltraBoot Disk Startup Menu
屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯




哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪















::

:t_menu

UltraBoot Disk Startup Menu
屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯

1. CDROM Driver Only
2. CDROM and SCSI Device
3. Compact Mode
哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪
4. Quit to DOS (ESC)
::

:start
set path=%ramdrv%\bin
set path=%path%;%ramdrv%\doscmd
mouse /u
cls

wbat text 2,2 @startup.bat:t_menu

wbat text 6,4 (+white on +blue) " 1. CDROM Driver Only "

wbat text 7,5 (+red on black) "2"
wbat text 8,5 (+red on black) "3"
wbat text 10,5 (+red on black) "4"

wbat cursor 12
func ? Time remaining:
func -w10>%temp%\tmp.bat
call %temp%\tmp.bat
del %temp%\tmp.bat

wbat text 12,1 " "

if "%?%"=="27" goto domenu4
if "%?%"=="13" goto domenu1

if "%?%"=="208" goto menu2
if "%?%"=="200" goto menu4

if "%?%"=="49" goto domenu1
if "%?%"=="50" goto domenu2
if "%?%"=="51" goto domenu3
if "%?%"=="52" goto domenu4

goto domenu1

:menu1
set ?=
call w.bat fix menu 1,1 (white on black) @startup.bat:w_menu #1
goto doit

:menu2
set ?=
call w.bat fix menu 1,1 (white on black) @startup.bat:w_menu #2
goto doit

:menu3
set ?=
call w.bat fix menu 1,1 (white on black) @startup.bat:w_menu #3
goto doit

:menu4
set ?=
call w.bat fix menu 1,1 (white on black) @startup.bat:w_menu #4
goto doit

:doit
cls
if "%?%"=="1" goto domenu1
if "%?%"=="2" goto domenu2
if "%?%"=="3" goto domenu3
if "%?%"=="4" goto domenu4
goto domenu4

:domenu1
cls
echo Extracting device driver(s)...
mkdir %ramdrv%\device
extract /y /l %ramdrv%\device /e a:\cdrom.cab >nul
device %ramdrv%\device\vide-cdd.sys /D:MSCD001

goto common

:domenu2

echo Extracting device driver(s)...
mkdir %ramdrv%\device
extract /y /l %ramdrv%\device /e a:\cdrom.cab >nul
extract /y /l %ramdrv%\device /e a:\scsi.cab >nul
device %ramdrv%\device\vide-cdd.sys /D:MSCD001
device %ramdrv%\device\btdosm.sys
device %ramdrv%\device\flashpt.sys
device %ramdrv%\device\btcdrom.sys /D:MSCD001
device %ramdrv%\device\aspi2dos.sys
device %ramdrv%\device\aspi8dos.sys
device %ramdrv%\device\aspi4dos.sys
device %ramdrv%\device\aspi8u2.sys
device %ramdrv%\device\aspicd.sys /D:MSCD001

goto common

:domenu3

echo Extracting device driver(s)...
mkdir %ramdrv%\device
extract /y /l %ramdrv%\device /e a:\cdrom.cab >nul
device %ramdrv%\device\vide-cdd.sys /D:MSCD001

cls
echo.
echo Preparing to start your computer.
echo This may take a few minutes. Please wait...
echo.

mkdir %ramdrv%\pdos
extract /y /l %ramdrv%\pdos /e a:\pdos.cab >nul
set path=%path%;%ramdrv%\pdos
copy %ramdrv%\pdos\pdos.def %ramdrv%\ >nul

mkdir %ramdrv%\vc
extract /y /l %ramdrv%\vc /e a:\vc.cab >nul
set path=%path%;%ramdrv%\vc

lh mscdex /D:MSCD001
lh smartdrv

goto end

:domenu4
cls
echo.
echo To see the menu again, type STARTUP and press ENTER.
echo.
set startup=4
goto end

:common
cls
echo.
echo Preparing to start your computer.
echo This may take a few minutes. Please wait...
echo.

mkdir %ramdrv%\pdos
extract /y /l %ramdrv%\pdos /e a:\pdos.cab >nul
set path=%path%;%ramdrv%\pdos
copy %ramdrv%\pdos\pdos.def %ramdrv%\ >nul

mkdir %ramdrv%\vc
extract /y /l %ramdrv%\vc /e a:\vc.cab >nul
set path=%path%;%ramdrv%\vc

mkdir %ramdrv%\tools
if exist a:\ghost.cab extract /y /l %ramdrv%\tools /e a:\ghost.cab >nul
if exist a:\pqmagic.cab extract /y /l %ramdrv%\tools /e a:\pqmagic.cab >nul
set path=%path%;%ramdrv%\tools

lh mscdex /D:MSCD001
lh smartdrv

echo.
echo The diagnostic tools were successfully loaded to drive Z:.
echo.

:end
echo To view Help, type HELP and then press ENTER.
echo.
%ramdrv%
lh mouse >nul
lh doskey >nul
set ?=
set wbat=

if "%startup%"=="4" goto eof
menu
:eof
set startup=
Floor 2 Posted 2002-11-11 00:00 ·  中国 江西 吉安 电信
版主
★★★★
Credits 7,296
Posts 1,628
Joined 2002-10-16 12:00
23-year member
UID 10
Gender Male
Status Offline
You can tell me which line you don't understand, and then I'll explain it. Otherwise, it's too much work, and it wouldn't mean that much. Also, compare it with that detailed explanation of AUTOEXEC.BAT and read through it slowly, try to understand it, okay? I hope you can actually learn something, instead of having me just stuff it into you.
ko20010214
=================================
大功告成,打个Kiss!
ko20010214@MSN.com
神州优雅Q300C
Intel CeleronM 370处理器 | 256MbDDR内存
40G硬盘 | USB2.0 | IEEE 1394
13.3 ' WXGA 宽屏(16:10) | COMBO光驱
10/100M网卡 | 四合一读卡器
Floor 3 Posted 2002-11-11 00:00 ·  中国 河南 郑州 联通
钻石会员
★★★★★
Credits 10,051
Posts 3,040
Joined 2002-11-11 00:00
23-year member
UID 223
Gender Male
Status Offline
This isn't programming, it's a batch file. I don't really understand it either.
简单就是美
Forum Jump: