Solved

Find Drive letter of CD-ROM in DOS

Posted on 2010-11-17
17
1,220 Views
Last Modified: 2012-05-10
Good day everyone. We have a DOS mahcine in the office and are trying to find out what the drive letter for it is or if it is even assigned a drive letter at all. How can we find out if it has a drive letter and if it does not how do we get it to work? The mahcine in question only has DOS installed, no other OS.
0
Comment
Question by:sscal
  • 5
  • 5
  • 3
  • +2
17 Comments
 
LVL 9

Expert Comment

by:Trackhappy
ID: 34160745
Man, you are asking a lot from the old grey matter...

What version of DOS?

view the contents of the config.sys and autoexec.bat files in the root directory. The drivers for the cd should be run from there if I remember correctly and normally specified a drive letter to use.
0
 
LVL 1

Author Comment

by:sscal
ID: 34160760
It is running MS-DOS 6.22
0
 
LVL 9

Expert Comment

by:Trackhappy
ID: 34160764
Man, that brings back nasty memories. ;).
c:
cd\
type config.sys
type autoexec.bat

look for things like device=cdrom.sys in the config.sys file.
0
 
LVL 9

Assisted Solution

by:Trackhappy
Trackhappy earned 83 total points
ID: 34160831
If it is not there, you need to locate a driver for the dc device and add it to the config.sys, then add

"DEVICE=C:\CDATAPI.SYS /D:MSCD001" into the config.sys

"C:\MSCDEX /D:MSCD001" into autoexec.bat

This assumes that cdatapi.sys and mscdex.exe are in the root directory of c drive, and that that drive is compatible with the device. You will need access to a dos editor (edit.exe) on the machine, or use copy con to completely overwrite the file from a command line. edit may be in the c:\dos folder and hopefully there is a path statement in the autoexec.bat.
0
 
LVL 19

Expert Comment

by:Thommy
ID: 34164193
Determine CD drive letter using a temporary vbs script...
@echo off

echo DL="none" >%tmp%\driveletter.vbs

echo Set C = CreateObject("Scripting.FileSystemObject").Drives >>%tmp%\driveletter.vbs

echo For Each D In C: If D.DriveType = 4 Then DL=D.DriveLetter >>%tmp%\driveletter.vbs

echo Next >>%tmp%\driveletter.vbs

echo WScript.Echo DL >>%tmp%\driveletter.vbs

for /f "tokens=1" %%a in (

'cscript.exe //Nologo %tmp%\driveletter.vbs') do set cd_driveletter=%%a



del %tmp%\driveletter.vbs

echo CD-ROM drive letter: %cd_driveletter%:

Open in new window

0
 
LVL 19

Expert Comment

by:Thommy
ID: 34164242
Without vbs script using standard Windows file system utility- Fsutil.exe...
@echo off

set cdrom=none

for %%a in (c d e f g h i j k l m n o p q r s t u v w x y z) do (

fsutil.exe fsinfo drivetype %%a:|find "CD-ROM">nul&&set cdrom=%%a:

)

echo CD-ROM drive letter: %cdrom%

Open in new window

0
 
LVL 19

Expert Comment

by:Thommy
ID: 34164510
The version with vb script only works under windows.

Don't know whether fsutil.exe exists under DOS 6.22!!!!

Please try if it works...
0
 
LVL 19

Expert Comment

by:Thommy
ID: 34165192
How to find out if cd-rom has a drive letter:

Insert a cd into the cd-rom drive (you should know the contents of the cd)

Type in DIR C: at dos prompt

if drive C exists you will see the contents of the drive C

Try DIR D:

if drive D exists you will see the contents of the drive D:
if it not exists you will get the error message "The system cannot find the drive specified."

Go on further with drive letters E:, F:, ... until you get back the contents of your CD

If you've reached Z: and did not get your CD contents until that, there is no CD drive defined...




0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 19

Expert Comment

by:Thommy
ID: 34165230
You can also check your drives by a batch script...
DIR A:

PAUSE

DIR B:

PAUSE

DIR C:

PAUSE

DIR D:

PAUSE

DIR E:

PAUSE

DIR F:

PAUSE

DIR G:

PAUSE

DIR H:

PAUSE

DIR I:

PAUSE

DIR J:

PAUSE

...

Open in new window

0
 
LVL 1

Author Comment

by:sscal
ID: 34165403
Trackhappy, I didn't see any idication of a cd rom drive listed in either the autoexec or config files. We have the drive setup in multiple partitions so C, D, E, and F are taken up. I couldn't find any other drive letter in use by perfomring dir on all possible drive letters.

Where would I find the driver for the cd rom? The drive has been installed for a long time but I don't think it was ever set up.
0
 
LVL 82

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 83 total points
ID: 34165818
@Trackhappy's comment about MSCDEX are correct, MS-DOS doesn't recognize CD-ROMs without it.  MS-DOS does Not have a 'native' driver for CD-ROMs.  Here's a page with a bunch of info about the old ways: http://www.computerhope.com/cdromd.htm  There are also links to drivers for the older CD-ROMs.  Each one required a different driver then.
0
 
LVL 1

Author Comment

by:sscal
ID: 34165973
OK so here is what I did. I grab the Oakcdrom.sys driver from the website above. I placed it in a folder on the C drive. I found the MSCDEX.exe file in the C;\DOS folder. I tried to use the drive letter "G" for the cdrom but it states every time I restart the computer the following:

Illegal Option 'G'
Usage:MSCDEX [/E/K/S/V] [/D:<DRIVER> ...] [/L:<LETTER>] [/M:<BUFFERS>]

included is the config and autoexec file contents.
Autoexec:

LH /L:0;1,11168 /S C:\NET\net initialize

@ECHO OFF

LH /L:0;1,45456 /S C:\DOS\SMARTDRV.EXE /X

SET CONFIG=E:\O5\CONFIG.ORA

SET INCLUDE=D:\QC\INC

SET TEMP=C:\TEMP

SET LIB=D:\QC\LIB

path c:\g;c:\glpt2;c:\w;c:\dbase;c:\dos;d:\qc\bin;e:\o5\pbin;e:\o5\bin;c:\net

LH /L:1,6384 C:\DOS\DOSKEY

LOADHIGH=C:\DOS\MSCDEX.EXE /G:MSCD001



C:\NET\netbind.com

LH /L:0;1,736 /S C:\NET\umb.com

C:\NET\tcptsr.exe

LH /L:0;1,2640 /S C:\NET\tinyrfc.exe

C:\NET\nmtsr.exe

LH /L:0;1,1184 /S C:\NET\emsbfr.exe

C:\NET\net start

d:

cd\qc\cadie08



Config:

DEVICE=C:\DOS\HIMEM.SYS

DEVICE=C:\DOS\EMM386.EXE RAM auto X=CC00-CDFF

BUFFERS=20,0

FILES=120

DOS=UMB

LASTDRIVE=Z

FCBS=4,0

DEVICEHIGH /L:1,18192 =C:\SIIGASPI\SIGASPI.SYS /D

DEVICEHIGH=C:\CDROM\OAKCDROM.SYS /G:MSCD001

DEVICE=C:\SIIGASPI\INIDISK.SYS

DOS=HIGH

DEVICEHIGH /L:1,4656 =C:\NET\IFSHLP.SYS

Open in new window

0
 
LVL 1

Author Comment

by:sscal
ID: 34166004
When I try to go to the G drive it states "Invalid Drive Specification"
0
 
LVL 95

Accepted Solution

by:
Lee W, MVP earned 84 total points
ID: 34166340
Your MSCDEX line is wrong and so is the driver line CONFIG.SYS line for the driver.

CONFIG.SYS needs to load the driver and NAME IT so that MSCDEX knows what driver (by name) if should assign a drive letter to - and what drive letter to assign.

The line in your config.sys should read:
DEVICEHIGH=C:\CDROM\OAKCDROM.SYS /D:MSCD001

(use /D instead of /G as you have in the example you posted above - this is NOT the drive letter.  This is saying "Device Name: MSCD001")

The AUTOEXEC.BAT file should read
LOADHIGH=C:\DOS\MSCDEX.EXE /D:MSCD001 /L:G

(Again, not /G:MSCD001, but /D:MSCD001 - telling MSCDEX what "Device Name" it should be using, and the /L:G tells MSCDEX to assign the G: drive letter to it).
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 34166346
Here's the Microsoft page on MSCDEX: http://support.microsoft.com/kb/87165

Looks like "/G:MSCD001" should be "/D:MSCD001", 'D' for driver name, not drive letter.

Also, if this is a SCSI drive instead of IDE, it requires a different driver, not MSCDEX.
0
 
LVL 1

Author Comment

by:sscal
ID: 34166501
leew and everyone, thank you very much. Issue solved!
0
 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 34166528
By the way... just to note... you could call the driver "SMEDLEY" if you wanted... it's just a name:

DEVICEHIGH=C:\CDROM\OAKCDROM.SYS /D:SMEDLEY
LOADHIGH=C:\DOS\MSCDEX.EXE /D:SMEDLEY /L:G
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now