中国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-09-09 15:46
47,812 topics / 349,914 posts / today 0 new / 48,268 members
DOS开发编程 & 发展交流 (开发室) » Please everyone for your advice! I want to make such a bootable disk.
Printable Version  3,441 / 9
Floor1 copy114 Posted 2002-11-10 00:00
初级用户 Posts 37 Credits 229
I want to make a bootable startup disk. After booting, it will use virtual memory to create a virtual disk, such as drive Z, then create three directories on the virtual disk, such as bin, abc, win, and finally automatically extract several compressed files XX.cab in my img file to the specified directory on the virtual disk. How should I do it? Please give me your advice. Also, since I'm a newbie, please give me detailed advice, okay?
Floor2 ko20010214 Posted 2002-11-10 00:00
版主 Posts 1,628 Credits 7,296
Please look at an example.

The content of autoexec.bat is as follows: The part after ">>" are the annotations I added now.
===================
@echo off >> This is a command to turn off echo. @ means that this command itself will not be displayed.
SET DIRCMD=/OGN /4 >> This is to set the default way of the DIR command  
           >> The /OGN parameter means to display in the order of group directories and names
           >> The /4 parameter means to represent the year with 4-digit numbers.
set ramd=z      >> This is to set a variable ramd, which is used to represent the virtual disk
set cdrom=x     >> This is to set a variable cdrom, which is used to represent the CD drive
xmsdsk 8192 %ramd%: /y /t >> This is a command to set the virtual disk. 8192 means the size of the disk is 8M
>> % ramd%: is to specify the drive letter of the virtual disk as ramd. Combined with the above
>> ramd=z, that is, specify the drive letter as drive Z. /Y is to confirm this operation
      >> /t means to load to the top of XMS
mkdir %ramd%:\temp   >> Create a directory temp on the virtual disk
set tmp=%ramd%:\temp >> Set a variable tmp
set temp=%ramd%:\temp >> Set a variable temp
copy a:\command.com %ramd%:\ >nul >> Copy the command.com file from drive A to the virtual disk,
>> >NUL means that the screen information of this command is input to the NUL this
        >> special device, this is an empty device. So it is
>> To make this command not echo.
set comspec=%ramd%:\command.com>> Set a variable comspec, the function is to specify           >> The location of the command interpreter command.com.
mkdir %ramd%:\bin    >> Create a directory bin on the virtual disk
mkdir %ramd%:\doscmd >> Create a directory doscmd on the virtual disk
set ebddir=%ramd%:\doscmd >> Set a variable edddir, the function is to specify the directory of ebd files
set path=%ramd%:\bin   >> Set a variable path, the function is to specify the path
copy a:\help.exe %ramd%:\bin >nul >> Copy the help.exe file from drive A to the virtual disk without echoing
       >> To the bin directory.
lh mscdex /D:MSCD001 /L:%CDROM% >> Load the CD drive driver, lh is loaded into the high memory,
>> /D:MSCD001, parameter D is the device name, this device name
       >> is MSCD001, which should be consistent with the name in your config.sys
copy a:\extract.exe %ramd%:\bin >nul >> Copy the extract.exe file from drive A to the virtual disk without echoing
               >> To the bin directory of the virtual disk
echo Extracting device driver(s)...  >> Display a message "Extracting device driver(s)..."
>> Meaning is "Extracting device driver(s)..."
mkdir %ramd%:\device     >> Create a directory device on the virtual disk
extract /y /l %ramd%:\device /e a:\scsi.cab >nul>> Extract the scsi.cab compressed package from drive A to the virtual disk without echoing
           >> The /Y parameter means
           >> Confirm this operation, the /L parameter means to extract the file to
           >> The specified directory. Here is the device directory.
%ramd%:\device\device %ramd%:\device\btdosm.sys >> This is a command to load various drivers
%ramd%:\device\device %ramd%:\device\flashpt.sys
%ramd%:\device\device %ramd%:\device\btcdrom.sys /D:MSCD001
%ramd%:\device\device %ramd%:\device\aspi2dos.sys
%ramd%:\device\device %ramd%:\device\aspi8dos.sys
%ramd%:\device\device %ramd%:\device\aspi4dos.sys
%ramd%:\device\device %ramd%:\device\aspi8u2.sys
%ramd%:\device\device %ramd%:\device\aspicd.sys /D:MSCD001
extract /y /l %ramd%:\bin /e a:\menu.cab >nul >> Extract the menui.cab compressed package from drive A to the virtual disk without echoing
>>
extract /y /l %ramd%:\doscmd /e a:\ebd.cab >nul >> Extract the ebd.cab compressed package from drive A to the virtual disk without echoing
>>
set path=%path%;%ramd%:\doscmd >> Set a variable path, that is, set the path
>> Separate multiple paths with ;, the meaning of path=%path% is
             >> To make the current path variable (path) be
             >> The original path, (; followed by the newly added path)
             >> The whole meaning is to set the new path as the old path plus the new
             >> Added path
LH CTMOUSE >NUL    >> Load the mouse driver into the high memory without echoing
lh smartdrv >NUL     >> Load smartdrv into the high memory without echoing
>> smartdrv is a disk cache driver
ECHO.         >> echo followed by a. means to display an empty line
echo To view Help, type HELP and then press ENTER.>> Display a message
       >> Meaning is "If you want to view help, please type Help and press Enter"
echo.     >> echo followed by a. means to display an empty line

======================
The file content is complete.
I don't know if this explanation is okay for you? :-)





Floor3 ko20010214 Posted 2002-11-10 00:00
版主 Posts 1,628 Credits 7,296
The corresponding comfig.sys file is as follows:
=================
DEVICE=UMBPCI.SYS
DEVICE=HIRAM.EXE
DEVICEHIGH=HIMEM.SYS /TESTMEM:OFF
DEVICEHIGH=VIDE-CDD.SYS /D:MSCD001  >>Load CD-ROM driver
DEVICEHIGH=CLOAKING.EXE
DOS=HIGH,UMB,AUTO
SHELL=COMMAND.COM /P /E:2048 /U:128 /L:256
FILESHIGH=30
BUFFERSHIGH=30,0
STACKSHIGH=9,256
LASTDRIVEHIGH=Z
==============
End of file content
Floor4 langhua Posted 2002-11-10 00:00
银牌会员 Posts 461 Credits 1,225
Hmm!!!
I said KO
Sure!!!!! The original one is also VERY GOOD in terms of DOS!!!

It seems that I will directly ask you for any problems in the future!!!! Hehe!!!
Floor5 copy114 Posted 2002-11-11 00:00
初级用户 Posts 37 Credits 229
mkdir %ramd%:\temp   >> Create a directory temp on the virtual disk
set tmp=%ramd%:\temp >> Set a variable tmp
set temp=%ramd%:\temp >> Set a variable temp

I want to ask here, didn't it create a temp directory in the first one? And the third one sets a variable temp
What is this variable, is it a folder?
Floor6 ko20010214 Posted 2002-11-11 00:00
版主 Posts 1,628 Credits 7,296
This temp is not that temp.
The temp on the first line is a directory. We are used to naming it temp, but actually you can name it arbitrarily.
The tmp and temp in the second and third lines are actually a variable agreed internally in DOS, and this name cannot be changed.
A series of variables are agreed internally in DOS for environment setting.
Like path, comspec, dircmd, and so on... This is like the reserved words in programming languages.
Moreover, among these three statements, the function and meaning of the first one are different from the latter two.
The first one is to create a directory, and this directory is called temp.
The second and third ones are to set environment variables, so that DOS knows where to write temporary data when it needs to use the temporary directory.
Floor7 copy114 Posted 2002-11-11 00:00
初级用户 Posts 37 Credits 229
mkdir %ramd%:\device     >> Create a directory device on the virtual disk
extract /y /l %ramd%:\device /e a:\scsi.cab >nul>> Unzip the scsi.cab archive from drive A to the device directory on the virtual disk without echoing. The /Y parameter confirms the operation, and the /L parameter extracts files to the specified directory, which is the device directory here.
%ramd%:\device\device %ramd%:\device\btdosm.sys >> Here is the command to load various drivers
%ramd%:\device\device %ramd%:\device\flashpt.sys
%ramd%:\device\device %ramd%:\device\btcdrom.sys /D:MSCD001
%ramd%:\device\device %ramd%:\device\aspi2dos.sys
%ramd%:\device\device %ramd%:\device\aspi8dos.sys
%ramd%:\device\device %ramd%:\device\aspi4dos.sys
%ramd%:\device\device %ramd%:\device\aspi8u2.sys
%ramd%:\device\device %ramd%:\device\aspicd.sys /D:MSCD001

Can I not have this part? If I am only loading the CDROM, are these all the driver programs needed to load the SCSI optical drive?
Floor8 ko20010214 Posted 2002-11-11 00:00
版主 Posts 1,628 Credits 7,296
Yes. As long as you load the CDROM, you just need lh mscdex /D:MSCD001 /L:%CDROM% >> Loading the CD-ROM driver. I don't know exactly what these drivers are. Probably for systems like WinME or later versions of WinME... (For compatibility??? )
Floor9 copy114 Posted 2002-11-11 00:00
初级用户 Posts 37 Credits 229
I understand, thank you for the moderator's careful guidance, I have also learned a lot, but please help me explain the specific command content of that config.sys, please,

DEVICE=UMBPCI.SYS
DEVICE=HIRAM.EXE
DEVICEHIGH=HIMEM.SYS /TESTMEM:OFF
DEVICEHIGH=VIDE-CDD.SYS /D:MSCD001  > Load CD-ROM driver
DEVICEHIGH=CLOAKING.EXE
DOS=HIGH,UMB,AUTO
SHELL=COMMAND.COM /P /E:2048 /U:128 /L:256
FILESHIGH=30
BUFFERSHIGH=30,0
STACKSHIGH=9,256
LASTDRIVEHIGH=Z I only know this defines the last drive letter is Z drive. The others are not so懂啊. Please advise
Floor10 ko20010214 Posted 2002-11-12 00:00
版主 Posts 1,628 Credits 7,296
SHELL=COMMAND.COM /P /E:2048 /U:128 /L:256
This sentence is difficult. It is mentioned in other DOS articles on wengier's website.
You can type command/? in DOS to get help. If it really doesn't work, you can go to read my article "How to Get Help for DOS Commands" to learn how to get help for DOS commands!
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023