中国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-08-14 06:24
47,811 topics / 349,898 posts / today 1 new / 48,256 members
DOS学习入门 & 精彩文章 (教学室) » How to automatically enter the CD-ROM under DOS
Printable Version  1,499 / 9
Floor1 garfield Posted 2005-04-09 00:00
初级用户 Posts 23 Credits 171
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.
Floor2 garfield Posted 2005-04-09 00:00
初级用户 Posts 23 Credits 171
I want to ask, what command should be used in autoexec.bat to correctly enter the CD-ROM drive~~~~
Floor3 chenhui530 Posted 2005-04-09 00:00
高级用户 Posts 273 Credits 772
Actually, wouldn't it be better to just specify the drive letter directly
Floor4 garfield Posted 2005-04-09 00:00
初级用户 Posts 23 Credits 171
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?
Floor5 JonePeng Posted 2005-04-09 00:00
金牌会员 Posts 1,883 Credits 4,562 From 广东广州
%CDROM% is not a command, just an environment variable. You have to run findcd.exe for it to take effect!
Floor6 garfield Posted 2005-04-09 00:00
初级用户 Posts 23 Credits 171
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%~~~~
Floor7 garfield Posted 2005-04-09 00:00
初级用户 Posts 23 Credits 171
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.
Floor8 JonePeng Posted 2005-04-09 00:00
金牌会员 Posts 1,883 Credits 4,562 From 广东广州
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.
Floor9 garfield Posted 2005-04-10 00:00
初级用户 Posts 23 Credits 171
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.
Floor10 dugaobo1 Posted 2005-04-12 00:00
初级用户 Posts 3 Credits 108
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)
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023