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-14 05:38
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » How to automatically enter the CD-ROM under DOS View 1,498 Replies 9
Original Poster Posted 2005-04-09 00:00 ·  中国 广东 广州 天河区 电信
初级用户
Credits 171
Posts 23
Joined 2005-02-12 00:00
21-year member
UID 36137
Gender Male
Status Offline
I want to add a command in autoexec.bat so the machine can automatically enter the CD-ROM and then run a program.
Drivers loaded for the CD-ROM (all selected from the Win98 boot disk):
device=oakcdrom.sys /D:mscd001
device=btdosm.sys
device=flashpt.sys
device=btcdrom.sys /D:mscd001
device=aspi2dos.sys
device=aspi8dos.sys
device=aspi4dos.sys
device=aspi8u2.sys
device=aspicd.sys /D:mscd001
There are two CD-ROM drives connected to the host, and the boot CD is in the primary CD-ROM drive. In autoexec.bat I used "%CDROM%:", but when testing it says invalid filename.
Floor 2 Posted 2005-04-09 00:00 ·  中国 广东 广州 天河区 电信
初级用户
Credits 171
Posts 23
Joined 2005-02-12 00:00
21-year member
UID 36137
Gender Male
Status Offline
I want to ask, what command should be used in autoexec.bat to correctly enter the CD-ROM drive~~~~
Floor 3 Posted 2005-04-09 00:00 ·  中国 湖南 长沙 电信
高级用户
★★
Credits 772
Posts 273
Joined 2004-10-23 00:00
21-year member
UID 32861
Gender Male
Status Offline
Actually, wouldn't it be better to just specify the drive letter directly
http://www.msfans.net/bbs/
Floor 4 Posted 2005-04-09 00:00 ·  中国 广东 广州 天河区 电信
初级用户
Credits 171
Posts 23
Joined 2005-02-12 00:00
21-year member
UID 36137
Gender Male
Status Offline
But sometimes on other computers the number of partitions is different, wouldn't that mess up all the drive letters?
I used to be able to use the command %CDROM%:, but now for some reason it doesn't work~~~~
I replaced some files in the boot disk with newer ones, for example: I changed msdos to version 7.1. Does the new version have some new command?
Floor 5 Posted 2005-04-09 00:00 ·  中国 广东 广州 海珠区 电信
金牌会员
★★★★
D◎$ Fαп
Credits 4,562
Posts 1,883
Joined 2004-01-19 00:00
22-year member
UID 15812
Gender Male
From 广东广州
Status Offline
%CDROM% is not a command, just an environment variable. You have to run findcd.exe for it to take effect!
----====≡≡≡≡ 我的至爱,永远是MSDOS!≡≡≡≡====----
Floor 6 Posted 2005-04-09 00:00 ·  中国 广东 广州 天河区 电信
初级用户
Credits 171
Posts 23
Joined 2005-02-12 00:00
21-year member
UID 36137
Gender Male
Status Offline
Do I really have to run findcd.exe?? But there is no such file at all on the Win98 boot disk, and it can still be used~~~ it's just that after I changed MSDOS to 7.1 it stopped working. (Is it running findramd.exe???) Also want to ask, what exactly is the detailed function of the environment variable %CDROM%~~~~
Floor 7 Posted 2005-04-09 00:00 ·  中国 广东 广州 天河区 电信
初级用户
Credits 171
Posts 23
Joined 2005-02-12 00:00
21-year member
UID 36137
Gender Male
Status Offline
Or is there some command or variable statement that can automatically enter the root directory of the CD-ROM?? (When there are two CD-ROM drives, default to entering the primary drive.) Previously the variable %CDROM%: also had this function.
Floor 8 Posted 2005-04-09 00:00 ·  中国 广东 广州 海珠区 电信
金牌会员
★★★★
D◎$ Fαп
Credits 4,562
Posts 1,883
Joined 2004-01-19 00:00
22-year member
UID 15812
Gender Male
From 广东广州
Status Offline
The Win98 boot disk originally doesn't have findcd.exe; only the MSDOS 7.1 boot disk does. It's a small program written by Wengier that automatically searches for the CD-ROM drive and outputs the drive letter to %cdrom%. Actually, environment variables can be created arbitrarily. Any environment variable is just a string, and you can reference it on the command line. When a command containing an environment variable is run, DOS will automatically restore the environment variable to its string value. For example, after running findcd, suppose the CD-ROM drive letter is G:, then %cdrom% is G:. When running PATH A:\; %CDROM%\ , the DOS command interpreter will process it as PATH A:\; G:\ To automatically enter the CD-ROM, you only need to run %cdrom%, because DOS will automatically restore it to G:. In the case of multiple CD-ROM drives, findcd.exe can assign the various drive letters to %cdrom1%, %cdrom2%, and %cdrom3%. I haven't tried testing it with multiple CD-ROM drives, but I guess %cdrom1% would be the primary CD-ROM drive.
----====≡≡≡≡ 我的至爱,永远是MSDOS!≡≡≡≡====----
Floor 9 Posted 2005-04-10 00:00 ·  中国 广东 广州 中移铁通
初级用户
Credits 171
Posts 23
Joined 2005-02-12 00:00
21-year member
UID 36137
Gender Male
Status Offline
I tried it: under DOS7.1, after running findcd.exe, using %cdrom% still can't automatically enter the CD-ROM drive, but on the Win98 boot disk it can be used even without running findcd.exe.
Floor 10 Posted 2005-04-12 00:00 ·  中国 浙江 宁波 鄞州区 电信
初级用户
Credits 108
Posts 3
Joined 2005-04-08 00:00
21-year member
UID 37990
Gender Male
Status Offline
How do you install DOS7.1 under XP? Can anyone provide detailed installation steps? QQ:24166814 (sorry, I had no other way, so I had to post it here)
Forum Jump: