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-12 20:13
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » How can I automatically switch to the CD-ROM drive letter after booting? View 1,623 Replies 11
Original Poster Posted 2003-07-06 00:00 ·  中国 山东 济宁 联通
初级用户
Credits 157
Posts 17
Joined 2003-07-06 00:00
23-year member
UID 6445
Gender Male
Status Offline
I'm a newbie and don't know DOS very well.
I want to make a boot disk to serve as the boot files for a CD,
so that after the machine starts up it can automatically switch to the CD-ROM drive letter.
How should the batch file be written?
What other files are needed on the disk?

Please take the time to answer this, thank you!!
Floor 2 Posted 2003-07-06 00:00 ·  中国 湖北 武汉 电信
元老会员
★★★★★
步行的人
Credits 9,654
Posts 3,351
Joined 2003-03-11 00:00
23-year member
UID 1113
Gender Male
From 湖北
Status Offline
No files are needed at all... as long as the batch file loads the CD-ROM drive at startup, that's enough.
I've talked about it in this section before, please look for it. Thanks... If you really can't find it, I'll explain it again...
弄花香满衣,掬水月在手。
明月鹭鸟飞, 芦花白马走。
我自一过后,野渡现横舟。
青云碧空在,净瓶水不流。
http://dos.e-stone.cn/guestbook/index.asp
======中國DOS聯盟=====
我的新网页http://rsds.7i24.com欢迎光顾
Floor 3 Posted 2003-07-06 00:00 ·  中国 山东 济宁 联通
初级用户
Credits 157
Posts 17
Joined 2003-07-06 00:00
23-year member
UID 6445
Gender Male
Status Offline
Thank you, master!
I really can't find it.
Please explain it after all.
Please be detailed, I only know how to use common commands like format, fdisk, cd, etc.
Thanks!
Floor 4 Posted 2003-07-06 00:00 ·  中国 湖北 武汉 电信
元老会员
★★★★★
步行的人
Credits 9,654
Posts 3,351
Joined 2003-03-11 00:00
23-year member
UID 1113
Gender Male
From 湖北
Status Offline
I think this has already been covered in the boot disk section, right...
弄花香满衣,掬水月在手。
明月鹭鸟飞, 芦花白马走。
我自一过后,野渡现横舟。
青云碧空在,净瓶水不流。
http://dos.e-stone.cn/guestbook/index.asp
======中國DOS聯盟=====
我的新网页http://rsds.7i24.com欢迎光顾
Floor 5 Posted 2003-07-06 00:00 ·  中国 广东 广州 白云区 电信
初级用户
★★★
Credits 1,480
Posts 377
Joined 2003-06-06 00:00
23-year member
UID 3875
Gender Male
Status Offline
In the autoexec.bat on the win98 boot disk, change the line set cdrom= to %cdrom%:
欢迎大家访问我的主页!
精品.爱好http://iso.533.net
Floor 6 Posted 2003-07-06 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
The following is quoted from 电吉入侵 at 2003-7-6 19:41:59:
In the autoexec.bat on the win98 boot disk, change the line set cdrom=  to %cdrom%:


That won't work. That boot disk doesn't have the %CDROM% variable.

My Super MS-DOS 7.10 boot disk does have the %CDROM% variable... for details, please see the "DOS Boot Disk" section.
Wengier - 新DOS时代

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

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

Floor 7 Posted 2003-07-07 00:00 ·  中国 江苏 无锡 电信
高级用户
★★
Credits 616
Posts 187
Joined 2003-04-18 00:00
23-year member
UID 1598
Gender Male
Status Offline
This is a repeated question, and I've already replied over there. The content is as follows:

If you already know how to use a boot floppy to make a bootable CD, and only don't know how to automatically switch to the CD-ROM drive letter after booting,
then you only need to solve the problem of finding the CD-ROM drive letter.
There are two methods:
1.Specify the CD-ROM drive letter: add /L:X to the end of the line with MSCDEX.EXE in AUTOEXEC.BAT on the boot floppy (X can be replaced with another letter). Note that CONFIG.SYS should contain this line: LASTDRIVE=Z
This method is simple and easy to use, recommended for beginners.
2.Use FINDCD.EXE to find the CD-ROM drive letter. This method is a bit more complicated; you can refer to the super moderator's MSDOS7.10 Super Boot Disk.

After deciding which method to use, add one more line at the end of AUTOEXEC.BAT on the boot floppy:
X: (the first method)
or
%CDROM%: (the second method)

Then after booting, you can enter the CD-ROM drive letter (of course, the drive letter of the first CD-ROM drive).

You can test it with a floppy disk first, and burn the CD after it works.

If you still don't know how to use a boot floppy to make a bootable CD, then first look through the old posts from before; after you learn that, do the above.
Floor 8 Posted 2003-07-07 00:00 ·  中国 广东 广州 白云区 电信
初级用户
★★★
Credits 1,480
Posts 377
Joined 2003-06-06 00:00
23-year member
UID 3875
Gender Male
Status Offline
The following is quoted from Wengier at 2003-7-6 19:58:22:
The following is quoted from 电吉入侵 at 2003-7-6 19:41:59:
In the autoexec.bat on the win98 boot disk, change the line set cdrom=  to %cdrom%:


That won't work. That boot disk doesn't have the %CDROM% variable.

My Super MS-DOS 7.10 boot disk does have the %CDROM% variable... for details, please see the "DOS Boot Disk" section.


How could it not have it? Wengier, look more carefully. I can use %cdrom%: to enter the CDROM just by deleting the set cdrom= line at the end.
欢迎大家访问我的主页!
精品.爱好http://iso.533.net
Floor 9 Posted 2003-07-07 00:00 ·  中国 山东 济宁 联通
初级用户
Credits 157
Posts 17
Joined 2003-07-06 00:00
23-year member
UID 6445
Gender Male
Status Offline
It really works now!
电吉入侵, thank you!!!
Thanks, everyone!
Floor 10 Posted 2003-07-07 00:00 ·  中国 山东 济宁 联通
初级用户
Credits 157
Posts 17
Joined 2003-07-06 00:00
23-year member
UID 6445
Gender Male
Status Offline
Impressive!!! Impressive!!!
Floor 11 Posted 2003-07-08 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
The %CDROM% variable in that boot disk is completely preset, and not obtained directly at all...

:do_shift
set cdrom=%2
shift

That's right, isn't it! And this will reduce compatibility.
Wengier - 新DOS时代

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

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

Floor 12 Posted 2003-07-08 00:00 ·  中国 广东 广州 白云区 电信
初级用户
★★★
Credits 1,480
Posts 377
Joined 2003-06-06 00:00
23-year member
UID 3875
Gender Male
Status Offline
Shouldn't it come from LH %ramd%:\MSCDEX.EXE /D:mscd001 /L:%CDROM% here?
Wengier, take a look and see if that's the case. Will this cause compatibility problems?
But why did Microsoft remove this variable at the end...

But that findcd of yours is still pretty useful (I'm using it^^)



欢迎大家访问我的主页!
精品.爱好http://iso.533.net
Forum Jump: