中国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-10-27 23:44
47,815 topics / 349,929 posts / today 1 new / 48,290 members
DOS启动盘 & LOGO技术 (启动盘室) » Memory Disk and CD-ROM Drive Letter Issues in Batch Files
Printable Version  981 / 5
Floor1 chujiafu Posted 2005-03-29 00:00
银牌会员 Posts 595 Credits 1,339 From 安徽 宿州
In batch files, we always define the drive letters for the memory disk and CD-ROM first, and then use them. For example, Set ramdrive= and Set cdrom=, then use Xmsdskt to create the memory disk, load the Vide-cdd.sys CD-ROM driver in Config.sys, load the shsucdx.exe CD-ROM extension driver in Autoexec.bat, and then use Findramd and Findcd to find the drive letters of the memory disk and CD-ROM, setting the path as: Path %ramdrive%\;%cdrom%\。But in some boot disks, %ramdrive% and %cdrom% have to be followed by a colon (, that is, like this: Path %ramdrive%:\;%cdorm%。
My question is: when exactly should there be a colon (, and when should there not be a colon (?
Floor2 JonePeng Posted 2005-03-29 00:00
金牌会员 Posts 1,883 Credits 4,562 From 广东广州
It depends on the program used to find the drive letter! Wengier's findcd.exe program automatically stores the drive letter and colon in the %cdrom% environment variable. But Win98's findramd batch program only stores the virtual disk drive letter in %ramdrive%, without the colon, so the path line has to add the colon. You should know that these %xxxx% environment variables are essentially just strings. Whenever a command containing environment variables is executed, DOS automatically "restores" the environment variables into strings. For example: when executing Path %ramdrive%\;%cdrom%, if the virtual disk drive letter is G: and the CD-ROM is H:, then the command is actually executing path g:\;h:
Floor3 brglng Posted 2005-03-30 00:00
银牌会员 Posts 466 Credits 1,200 From 上海
Win98's one is %ramd%, and it does not include the colon. Whether to add %cdrom% in path is up to you. I just don't like adding a: and %cdrom% to path, because if the required command is not in the ramdisk, it will automatically go to a: and cdrom to look for it, which instead reduces system efficiency.
Floor4 chujiafu Posted 2005-03-31 00:00
银牌会员 Posts 595 Credits 1,339 From 安徽 宿州
With or without the colon is not the same. Suppose you use Finfcd to find the CD-ROM drive letter and it is drive G. If you do not include the colon, then Path %cdrom%\ becomes Path G\ , and that won't work; on the other hand, if you include the colon, Path %cdrom%:\ becomes Path G:\, and that will work.
Floor5 tq08rsu Posted 2005-04-02 00:00
初级用户 Posts 22 Credits 177
Why not use shsucdx.exe to specify the drive letter? I just set the CD to z:\
Floor6 chujiafu Posted 2005-04-05 00:00
银牌会员 Posts 595 Credits 1,339 From 安徽 宿州
Of course you can specify the CD-ROM drive letter and the memory disk drive letter, but I prefer my way.
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023