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-07-23 00:13
中国DOS联盟论坛 » DOS启动盘 & LOGO技术 (启动盘室) » Question for expert Wengier, [Urgent Urgent Urgent]! View 1,116 Replies 14
Original Poster Posted 2003-06-07 00:00 ·  中国 河北 沧州 任丘市 联通
中级用户
★★
MS-DOS爱好者
Credits 397
Posts 87
Joined 2002-12-15 00:00
23-year member
UID 517
Gender Male
Status Offline
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!
Floor 2 Posted 2003-06-07 00:00 ·  中国 香港
管理员
★★★★
專業島民
Credits 4,869
Posts 1,633
Joined 2002-12-10 00:00
23-year member
UID 465
Gender Male
Status Offline
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

我的網站:http://mw16.2ya.com/ 我的網誌: http://scrappedblog.blogspot.com/
~
我的Winamp正在播放的歌曲:
Floor 3 Posted 2003-06-07 00:00 ·  中国 河北 沧州 任丘市 联通
中级用户
★★
MS-DOS爱好者
Credits 397
Posts 87
Joined 2002-12-15 00:00
23-year member
UID 517
Gender Male
Status Offline
Thank you, but what does adding command /f /c in front mean? Could you explain it a bit?
Floor 4 Posted 2003-06-07 00:00 ·  中国 香港
管理员
★★★★
專業島民
Credits 4,869
Posts 1,633
Joined 2002-12-10 00:00
23-year member
UID 465
Gender Male
Status Offline
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)
我的網站:http://mw16.2ya.com/ 我的網誌: http://scrappedblog.blogspot.com/
~
我的Winamp正在播放的歌曲:
Floor 5 Posted 2003-06-07 00:00 ·  中国 河北 沧州 任丘市 联通
中级用户
★★
MS-DOS爱好者
Credits 397
Posts 87
Joined 2002-12-15 00:00
23-year member
UID 517
Gender Male
Status Offline
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:
Floor 6 Posted 2003-06-07 00:00 ·  中国 河北 沧州 任丘市 联通
中级用户
★★
MS-DOS爱好者
Credits 397
Posts 87
Joined 2002-12-15 00:00
23-year member
UID 517
Gender Male
Status Offline
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!
Floor 7 Posted 2003-06-07 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
。。。。。。

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.
Wengier - 新DOS时代

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

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

Floor 8 Posted 2003-06-08 00:00 ·  中国 河北 沧州 任丘市 联通
中级用户
★★
MS-DOS爱好者
Credits 397
Posts 87
Joined 2002-12-15 00:00
23-year member
UID 517
Gender Male
Status Offline
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?
Floor 9 Posted 2003-06-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
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.
Wengier - 新DOS时代

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

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

Floor 10 Posted 2003-06-08 00:00 ·  中国 河北 沧州 任丘市 联通
中级用户
★★
MS-DOS爱好者
Credits 397
Posts 87
Joined 2002-12-15 00:00
23-year member
UID 517
Gender Male
Status Offline
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
Floor 11 Posted 2003-06-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
What error is it prompting? I've been using VIDE-CDD.SYS for several years already, and there has been no problem.
Wengier - 新DOS时代

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

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

Floor 12 Posted 2003-06-08 00:00 ·  中国 河北 沧州 任丘市 联通
中级用户
★★
MS-DOS爱好者
Credits 397
Posts 87
Joined 2002-12-15 00:00
23-year member
UID 517
Gender Male
Status Offline
I was testing the modified file directly under Win98. I wonder if that has anything to do with it?
Floor 13 Posted 2003-06-08 00:00 ·  中国 河北 沧州 任丘市 联通
中级用户
★★
MS-DOS爱好者
Credits 397
Posts 87
Joined 2002-12-15 00:00
23-year member
UID 517
Gender Male
Status Offline
I'll try again and see how it runs under DOS!
Floor 14 Posted 2003-06-08 00:00 ·  中国 河北 沧州 任丘市 联通
中级用户
★★
MS-DOS爱好者
Credits 397
Posts 87
Joined 2002-12-15 00:00
23-year member
UID 517
Gender Male
Status Offline
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!
Floor 15 Posted 2003-06-08 00:00 ·  中国 河北 沧州 任丘市 联通
中级用户
★★
MS-DOS爱好者
Credits 397
Posts 87
Joined 2002-12-15 00:00
23-year member
UID 517
Gender Male
Status Offline
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!
Forum Jump: