中国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-06 07:56
47,812 topics / 349,914 posts / today 0 new / 48,268 members
DOS启动盘 & LOGO技术 (启动盘室) » Question for expert Wengier, [Urgent Urgent Urgent]!
Printable Version  1,198 / 14
Floor1 sglxy Posted 2003-06-07 00:00
中级用户 Posts 87 Credits 397
Expert Wengier, my computer has three CD-ROM drives (one burner and two old CD-ROM drives). I want to make a bootable CD that automatically installs Win98. Right now I need the CD, after booting, to automatically find from among the three CD-ROM drives which drive letter this disc is in, so that it can operate on the CD. So I used your findcd.exe file, and added the following lines to autoexec.bat:

CTLOAD oakcdrom.sys /d:mscd001
MSCDEX.EXE /d:mscd001
Findcd/s
if %CDROM%#==5# goto 5CD
if %CDROM%#==4# goto 4CD
if %CDROM%#==3# goto 3CD
if %CDROM%#==2# goto 2CD
if %CDROM%#==0# goto err
:1CD
set Win98CD=%CDROM1%
goto 98UP
:2CD
if not exist %CDROM2%\win98\setup.exe goto 1cd
set Win98CD=%CDROM2%
goto 98UP
:3CD
if not exist %CDROM3%\win98\setup.exe goto 2cd
set Win98CD=%CDROM3%
goto 98UP
:4CD
if not exist %CDROM4%\win98\setup.exe goto 3cd
set Win98CD=%CDROM4%
goto 98UP

In theory the above commands are still fairly correct, but when I boot from this CD I get the following prompt:

C:\>MSCDEX.EXE /d:mscd001
MSCDEX Version 2.95 already started

C:\>Findcd/s
CDROM=3
CDROM1=I:
CDROM2=J:
CDROM3=K:

C:\>if 3#==5# goto 5CD
C:\>if 3#==4# goto 4CD
C:\>if 3#==3# goto 3CD
C:\>if not exist K:\win98\setup.exe goto 2cd

Not ready reading drive K
Abort, Retry, Fail?

I analyzed the reason a bit, and found that when autoexec.bat runs, the program first starts checking for the CD from the drive letter of the last CD-ROM drive. If the specified file is on the disc, then that disc is determined to be the one with the drive letter we want. But when the disc is not in that drive, the above error prompt appears. How should this problem be solved? Also, is there any simpler, better, and more accurate way to let the program automatically find which drive letter among several CD-ROM drives contains the current disc? Please advise me,
many thanks!
Floor2 Roy Posted 2003-06-07 00:00
管理员 Posts 1,633 Credits 4,869
Change it to this.....

CTLOAD oakcdrom.sys /d:mscd001
MSCDEX.EXE /d:mscd001
Findcd/s
if %CDROM%#==5# goto 5CD
if %CDROM%#==4# goto 4CD
if %CDROM%#==3# goto 3CD
if %CDROM%#==2# goto 2CD
if %CDROM%#==0# goto err
:1CD
set Win98CD=%CDROM1%
goto 98UP
:2CD
command /f /c if not exist %CDROM2%\win98\setup.exe goto 1cd
set Win98CD=%CDROM2%
goto 98UP
:3CD
command /f /c if not exist %CDROM3%\win98\setup.exe goto 2cd
set Win98CD=%CDROM3%
goto 98UP
:4CD
command /f /c if not exist %CDROM4%\win98\setup.exe goto 3cd
set Win98CD=%CDROM4%
goto 98UP

Floor3 sglxy Posted 2003-06-07 00:00
中级用户 Posts 87 Credits 397
Thank you, but what does adding command /f /c in front mean? Could you explain it a bit?
Floor4 Roy Posted 2003-06-07 00:00
管理员 Posts 1,633 Credits 4,869
It uses a second command.com to execute the if command with /f (automatically choosing Fail for the "Abort, Retry, Fail?" option) and /c (exit the second command.com after the command finishes executing)
Floor5 sglxy Posted 2003-06-07 00:00
中级用户 Posts 87 Credits 397
After adding command /f /c in front, the result is still wrong. The following is the result after adding command /f /c. Note that at this time the actual drive letter where my CD is located is "I", not "K". It looks like the command /f /c command only makes the system ignore the error prompt:
CDROM1=I:
CDROM2=J:
CDROM3=K:
C:\>if 3#==5# goto 5CD
C:\>if 3#==4# goto 4CD
C:\>if 3#==3# goto 3CD
C:\>command /f /c if not exist K:\win98\setup.exe goto 2cd

Not ready reading drive K
Abort, Retry, Fail?
Not ready reading drive K
Abort, Retry, Fail?
C:\>set Win98CD=K:

C:\>goto 98UP

C:\>echo The CD-ROM drive letter on this computer is: K:
The CD-ROM drive letter on this computer is: K:
Floor6 sglxy Posted 2003-06-07 00:00
中级用户 Posts 87 Credits 397
Could it be that none of the experts here has a solution? Looks like I can only wait for chief moderator Wengier and master Rushi to show up tonight, miserable!
Floor7 Wengier Posted 2003-06-07 00:00
系统支持 Posts 10,521 Credits 27,736
。。。。。。

That's true indeed... When there is no disc in the CD-ROM drive (or no floppy in the floppy drive), using any DOS command to read the CD/floppy will produce an error like "Not ready...". The solution is to first use commands like DREADY to check whether there is a disc in the drive before using the IF NOT EXIST... command, and then proceed to the next step, for example:

dready %CDROM2%
if errorlevel 1 goto 1cd
if not exist %CDROM2%\win98\setup.exe goto 1cd
set Win98CD=%CDROM2%
goto 98UP

Also, I suggest changing OAKCDROM.SYS to VIDE-CDD.SYS for better results.
Floor8 sglxy Posted 2003-06-08 00:00
中级用户 Posts 87 Credits 397
Thank you, webmaster Wengier! I've finally been waiting for you to appear.
Also, I want to know the download address and detailed usage for dready and VIDE-CDD.SYS. Could you please advise?
Floor9 Wengier Posted 2003-06-08 00:00
系统支持 Posts 10,521 Credits 27,736
Sure, both DREADY and VIDE-CDD.SYS are included in my MS-DOS 7.10 boot disk. Download address:
http://newdos.yginfo.net/dosware/mdos71bd.zip

VIDE-CDD.SYS is used the same way as OAKCDROM.SYS, but it is much more powerful and practical. The usage of DREADY can be seen above.
Floor10 sglxy Posted 2003-06-08 00:00
中级用户 Posts 87 Credits 397
But in the above batch file I directly replaced OAKCDROM.SYS with VIDE-CDD.SYS, and copied the VIDE-CDD.SYS file from mdos71bd.zip
into that folder, but after running it gives an error prompt. But when I change it back to the original OAKCDROM.SYS, it works normally again. Why is that? Please help me take a look:

CTLOAD Vide-cdd.sys /d:mscd001
MSCDEX.EXE /d:mscd001
Floor11 Wengier Posted 2003-06-08 00:00
系统支持 Posts 10,521 Credits 27,736
What error is it prompting? I've been using VIDE-CDD.SYS for several years already, and there has been no problem.
Floor12 sglxy Posted 2003-06-08 00:00
中级用户 Posts 87 Credits 397
I was testing the modified file directly under Win98. I wonder if that has anything to do with it?
Floor13 sglxy Posted 2003-06-08 00:00
中级用户 Posts 87 Credits 397
I'll try again and see how it runs under DOS!
Floor14 sglxy Posted 2003-06-08 00:00
中级用户 Posts 87 Credits 397
After running it under DOS, it hangs! It looks like VIDE-CDD.SYS cannot be loaded directly from a batch file using Ctload.com. Could it be that it must be loaded from CONFIG.sys or called using some other file? I'll try again!
Floor15 sglxy Posted 2003-06-08 00:00
中级用户 Posts 87 Credits 397
I found the reason: it turned out to be caused by incompatibility between Ctload.com and Vide-cdd.sys, and I've already solved it. I've really benefited a lot here. Comrade Wengier, thank you and your forum!
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023