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-08-01 11:07
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » May I ask for an explanation of this batch processing point? Can you explain it in detail? View 3,039 Replies 10
Original Poster Posted 2003-06-04 00:00 ·  中国 广东 佛山 南海区 电信
初级用户
★★
Credits 321
Posts 66
Joined 2003-05-22 00:00
23-year member
UID 2315
Gender Male
Status Offline
@ECHO OFF
SET DIRCMD=/O
set ramdrv=z:
a:\xmsdsk 4096 %ramdrv% /y /t

echo.
echo Preparing base files to drive Z, please stand by...
echo.

copy a:\io.sys z: >nul
copy a:\msdos.sys z: >nul

mkdir %ramdrv%\bin
mkdir %ramdrv%\doscmd
mkdir %ramdrv%\temp
set tmp=%ramdrv%\temp
set temp=%ramdrv%\temp
set ebddir=%ramdrv%\doscmd

set path=%ramdrv%\bin
copy a:\command.com %ramdrv%\ >nul
set comspec=%ramdrv%\command.com
copy a:\readme.txt %ramdrv%\bin >nul
copy a:\readme.bat %ramdrv%\bin >nul

copy a:\extract.exe %ramdrv%\bin >nul
copy a:\device.com %ramdrv%\bin >nul

extract /y /l %ramdrv%\bin /e a:\menu.cab >nul
extract /y /l %ramdrv%\doscmd /e a:\ebd.cab >nul
set path=%path%;%ramdrv%\doscmd

func -v
func -v

startup.bat

If it is changed to a bootable CD, how should it be modified? Thanks to everyone first!
Floor 2 Posted 2003-06-05 00:00 ·  中国 广东 佛山 南海区 电信
初级用户
★★
Credits 321
Posts 66
Joined 2003-05-22 00:00
23-year member
UID 2315
Gender Male
Status Offline
Answer your question~~~! Very urgent!
Floor 3 Posted 2003-06-05 00:00 ·  中国 广东 广州 电信
元老会员
★★★
Credits 1,468
Posts 407
Joined 2002-10-21 00:00
23-year member
UID 34
Gender Male
From 广州
Status Offline
This batch file is actually relatively easy to understand, for example:
@ECHO OFF ;Suppress redundant display information
SET DIRCMD=/O ;Set the environment variable of DIR, so that when executing DIR, it will arrange directories and folders in order
set ramdrv=z: ;Set the value of variable "ramdrv" to "z:"
a:\xmsdsk 4096 %ramdrv% /y /t ;Create a virtual disk, specify the drive letter as variable "ramdrv", that is "z:"

echo. ;Display a blank line
echo Preparing base files to drive Z, please stand by...
echo.

copy a:\io.sys z: >nul ;Copy files to z:, and suppress the display result, the following parts of the statements are similar;
copy a:\msdos.sys z: >nul

mkdir %ramdrv%\bin ;Create a new directory, that is: z:\bin
mkdir %ramdrv%\doscmd
mkdir %ramdrv%\temp
set tmp=%ramdrv%\temp ;Set the temporary folder
set temp=%ramdrv%\temp ;Set the temporary folder
set ebddir=%ramdrv%\doscmd ;Set the variable

set path=%ramdrv%\bin ;Set the command search path
copy a:\command.com %ramdrv%\>nul
set comspec=%ramdrv%\command.com ;Set the command interpreter path
copy a:\readme.txt %ramdrv%\bin >nul
copy a:\readme.bat %ramdrv%\bin >nul

copy a:\extract.exe %ramdrv%\bin >nul
copy a:\device.com %ramdrv%\bin >nul

extract /y /l %ramdrv%\bin /e a:\menu.cab >nul ;Extract files to %ramdrv%\bin (that is Z:\bin)
extract /y /l %ramdrv%\doscmd /e a:\ebd.cab >nul
set path=%path%;%ramdrv%\doscmd

func -v
func -v

startup.bat

Because the boot CD is booted by simulating drive A, so as far as this file itself is concerned, basically no major modifications are needed. If you want to support the CD drive, you need to add the CD drive driver.
欢迎大家观临我的个人主页:

http://dosdiy.bluepc.com.cn/
http://dosdiy.ys168.com/


EMAIL: lydong@china.com.cn lydong@yeah.net
----------------------------------------------
Floor 4 Posted 2003-06-05 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
Is this batch script written by pkmater?
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 5 Posted 2003-06-05 00:00 ·  中国 广东 佛山 南海区 电信
初级用户
★★
Credits 321
Posts 66
Joined 2003-05-22 00:00
23-year member
UID 2315
Gender Male
Status Offline
Below is the quote of Wengier's speech on 2003-6-5 0:41:05:
This batch script was written by pkmater, right?

Hmm~~~! But I want to make his Chinese bootable disk into a bootable CD!
Floor 6 Posted 2003-06-05 00:00 ·  中国 广东 佛山 南海区 电信
初级用户
★★
Credits 321
Posts 66
Joined 2003-05-22 00:00
23-year member
UID 2315
Gender Male
Status Offline
The following is a quote from lydong on 2003-6-5 0:38:22:
This batch file is actually relatively easy to understand. For example:
@ECHO OFF ;Suppress redundant display information
SET DIRCMD=/O ;Set the environment variable for DIR, so that when DIR is executed, directories and folders are arranged in order
set ramdrv=z: ;Set the value of the variable "ramdrv" to "z:"
a:\xmsdsk 4096 %ramdrv% /y /t ;Create a virtual disk, specify the drive letter as the variable "ramdrv", that is, "z:"

echo. ;Display a blank line
echo Preparing base files to drive Z, please stand by...
echo.

copy a:\io.sys z: >nul ;Copy the file to z:, and suppress the display result. The following parts of the statements are similar;
copy a:\msdos.sys z: >nul

mkdir %ramdrv%\bin ;Create a new directory, that is: z:\bin
mkdir %ramdrv%\doscmd
mkdir %ramdrv%\temp
set tmp=%ramdrv%\temp ;Set the temporary folder
set temp=%ramdrv%\temp ;Set the temporary folder
set ebddir=%ramdrv%\doscmd ;Set the variable

set path=%ramdrv%\bin ;Set the command search path
copy a:\command.com %ramdrv%\>nul
set comspec=%ramdrv%\command.com ;Set the command interpreter path
copy a:\readme.txt %ramdrv%\bin >nul
copy a:\readme.bat %ramdrv%\bin >nul

copy a:\extract.exe %ramdrv%\bin >nul
copy a:\device.com %ramdrv%\bin >nul

extract /y /l %ramdrv%\bin /e a:\menu.cab >nul ;Extract the file to %ramdrv%\bin (that is, Z:\bin)
extract /y /l %ramdrv%\doscmd /e a:\ebd.cab >nul
set path=%path%;%ramdrv%\doscmd

func -v
func -v

startup.bat

Because the boot CD is booted by simulating drive A, so for this file itself, basically no major modifications are needed. If you want to support the optical drive, you need to add the optical drive driver.



How to specifically modify and add the optical drive driver?
Floor 7 Posted 2003-06-05 00:00 ·  中国 广东 广州 增城区 电信
元老会员
★★★
Credits 1,468
Posts 407
Joined 2002-10-21 00:00
23-year member
UID 34
Gender Male
From 广州
Status Offline
First, copy the CD-ROM drive drivers (such as Vide-cdd.sys and MSCDEX.EXE/Shsucdx.exe) to the A drive. Then add the following statement in config.sys:
DEVICEHIGH=Vide-cdd.sys /D:MSCD001

Then add in AUTOEXEC.BAT:
MSCDEX.EXE /D:MSCD001 (or: Shsucdx.exe /D:MSCD001 )
欢迎大家观临我的个人主页:

http://dosdiy.bluepc.com.cn/
http://dosdiy.ys168.com/


EMAIL: lydong@china.com.cn lydong@yeah.net
----------------------------------------------
Floor 8 Posted 2003-06-05 00:00 ·  中国 广东 佛山 南海区 电信
初级用户
★★
Credits 321
Posts 66
Joined 2003-05-22 00:00
23-year member
UID 2315
Gender Male
Status Offline
MSCDEX.EXE /D:MSCD001 (or: Shsucdx.exe /D:MSCD001) ----> Where to add it in AUTOEXEC.BAT?
Floor 9 Posted 2003-06-05 00:00 ·  中国 湖北 随州 电信
元老会员
★★★
Credits 1,987
Posts 632
Joined 2002-10-27 00:00
23-year member
UID 73
Gender Male
Status Offline
The last line of the first paragraph, it is best to use LH MSCDEX.EXE /D:MSCD001.

http://dos.e-stone.cn/dosbbs
uploadImages/200311161145850422.swf
Floor 10 Posted 2003-06-05 00:00 ·  中国 广东 佛山 南海区 电信
初级用户
★★
Credits 321
Posts 66
Joined 2003-05-22 00:00
23-year member
UID 2315
Gender Male
Status Offline
............
a:\xmsdsk 4096 %ramdrv% /y /t
MSCDEX.EXE /D:MSCD001
Is this so?
Floor 11 Posted 2003-06-05 00:00 ·  中国 湖北 武汉 电信
元老会员
★★★★★
步行的人
Credits 9,654
Posts 3,351
Joined 2003-03-11 00:00
23-year member
UID 1113
Gender Male
From 湖北
Status Offline
Um.. It doesn't matter where. .. This batch file has no variables and no options. ..
弄花香满衣,掬水月在手。
明月鹭鸟飞, 芦花白马走。
我自一过后,野渡现横舟。
青云碧空在,净瓶水不流。
http://dos.e-stone.cn/guestbook/index.asp
======中國DOS聯盟=====
我的新网页http://rsds.7i24.com欢迎光顾
Forum Jump: