Subj : Re: how to detect cdrom? To : Brian.Iglesias@xspamp0.f321.n751.z6 From : Steve Date : Fri Feb 08 2002 01:15 am From: Steve@f3.n342.z1.cereal.mv.com (Steve) Subject: Re: how to detect cdrom? From: "E. S. (Steve) Fabian" Brian.Iglesias@xspamp0.f321.n751.z6.fidonet.org wrote: > > hello everyone. > > i am looking for a generic batch routine that will detect the cdrom > and ramdrive. this is for a pcdos 2000 bootdisk. previously, > i was using msdos 6.22 with 'findramd.exe' (with setramd.bat) > from the win98se ebd, but when i moved it to pcdos it didn't work. > > i traced it and 'xmsdsk.exe' loads fine, but 'findramd.exe' does not > return the errorlevel like before. i have the feeling it doesn't like > non-MS dos'es. > > can this be done without using external utilities? You can detect a CDROM using %@CDROM[x:] Locating a virtual [ram] disk is not trivial. I use %@label[x:] and compare the resulting string with the known labels my virtual disk drivers create - Microsoft's RAMDISK.SYS creates the label "MS-RAMDRIVE". Unfortunately, there is no way to prevent one from using that label on a hard disk. You can detect a removable drive with - of all things - %@removable[x:]. Type HELP FUNCTION at the 4DOS prompt and look at the "drioves and devices" section. -- E. S. "Steve" Fabian ESFabian@BellAtlantic.net POB 1540, Cherry Hill, NJ 08034 Telephone: 856-354-1752 EMPIRE Consultants, Inc. Director, Software Development ------------------------------------------------------------------- -- |Fidonet: Steve 1:342/3 | | Origin: The Cereal Port BBS (603)899-3335 199.125.78.133 (1:132/152) --- # Origin: (1:132/152.4) * Origin: Baddog BBS (1:218/903) .