Cannot Access CD-ROM Drive from MS-DOS Mode or Command Prompt

This article was previously published under Q135174
This article has been archived. It is offered "as is" and will no longer be updated.
SYMPTOMS
When you restart your computer in MS-DOS mode, restart to a Windowscommand prompt or restart your computer and use a startup disk, you maynot be able to access your CD-ROM drive. This behavior may occur eventhough you are able to access the CD-ROM drive from the Windows graphicaluser interface.
CAUSE
This behavior can occur if any of the following conditions exist:
  • The CD-ROM driver or Mscdex.exe file is disabled (commented) or missing from the Autoexec.bat or Config.sys file.
  • The CD-ROM driver or Mscdex.exe file is missing or damaged.
  • The startup disk does not contain the CD-ROM driver or Mscdex.exe file.
  • You have replaced the original CD-ROM and not updated MS-DOS drivers.
To access a CD-ROM drive when you boot to a Windows command prompt orrestart the computer in MS-DOS mode, you must load the real-mode CD-ROMdriver in the Config.sys file and the MSCDEX driver in the Autoexec.bat orDosstart.bat file. If your CD-ROM drive is supported in protected mode inWindows, the real-mode CD-ROM and MSCDEX drivers are most likely notbeing loaded in the Config.sys and Autoexec.bat or Dosstart.bat files onthe hard disk. In addition, if you boot from a floppy disk, the CD-ROM andMSCDEX drivers will not load unless you manually configure the Config.sysand Autoexec.bat files on the floppy disk to load them.
RESOLUTION
To resolve this behavior, use any of the following methods:
  • Run the Dosstart.bat file.
  • Extract the correct version of the Mscdex.exe file.
  • Add the appropriate files and commands to your startup disk.
  • Install the MS-DOS drivers for your CD-ROM from Command Prompt Only.

Dosstart.bat File

When you upgrade MS-DOS or Windows 3.x to Windows 95/98, your originalMscdex.exe file can be copied over to the Dosstart.bat file. Dosstart.batcontains copies of any commands Windows Setup remarks out and is runautomatically when you restart your computer in MS-DOS Mode.

If you restart your computer and then choose Command Prompt Only,Dosstart.bat is not run. To run the command, type dosstart.bat, and then press ENTER.

Mscdex.exe Problems

If you attempt to run Mscdex.exe and receive the following error message,the Mscdex.exe file may be damaged
Mscdex.exe <parameters> missing or corrupted
where <parameters> are command-line switches that may be included in thecommand line in a batch file, such as Autoexec.bat or Dosstart.bat.

Determine the location of the batch file by typing the following linesfrom Command Prompt Only, pressing ENTER after each line
<drive>:
dir /s mscdex.exe
where <drive> is the drive letter of the drive containing the Windowsfolder.

If the file cannot be found, you can extract the file from the Windows 95disks. The Mscdex.exe is file is located in the Win95_04.cab file on theWindows 95 CD-ROM, the Win95_05.cab file on disk 5 of the Windows 95 DMFdiskettes, the Win95_07.cab file on disk 7 of the Windows 95 non-DMFdiskettes, and the Win95_06.cab file on the Windows 95 OEM Service Release2 CD-ROM.

For information about how to extract files in Windows 95, see thefollowing article in the Microsoft Knowledge Base:
129605 How to Extract Original Compressed Windows Files
Place the Mscdex.exe file in the Windows\Command folder.

NOTE: Some batch files may point to a different folder location than theWindows\Command folder. If this is the case, edit the file to point to theWindows\Command folder. To do so, follow these steps:
  1. Click Start, point to Programs, and then click MS-DOS Prompt.
  2. Type each of the following lines, pressing ENTER after each line:
    <drive>:
    cd\<windows>
    edit dosstart.bat
  3. Press ALT+S (Search), and then press F.
  4. Find the Mscdex.exe file. If necessary, type mscdex.exe in the Find What box, and then click OK.
  5. Verify that the path for Mscdex.exe is the Windows\Command folder. If it is not, type the correct path.
  6. Press ALT+F (File), press X, and then press ENTER when prompted to save the file.
In most cases, the Windows 95 version of the Mscdex.exe file workscorrectly with most CD-ROM drives, but if you have problems detecting theCD-ROM drive, contact the CD-ROM manufacturer for assistance.

Startup Disk Drivers

If you create a startup disk, restart your computer using it, and do nothave access to your CD-ROM drive, the correct CD-ROM driver or Mscdex.exefile is not loading. To prepare a startup disk to load CD-ROM drivers,follow these steps:
  1. Edit the Config.sys file to include the entry for your CD-ROM driver. To do so, follow these steps:

    1. Click Start, click Run, type sysedit in the Open box, and then click OK.
    2. Click the Config.sys title bar, find the line that loads your CD-ROM driver, drag the pointer to select the line text, and then click Copy on the Edit menu. Note the name and path of the CD-ROM driver.
    3. Click Start, point to Programs, click Accessories, and then click Notepad.
    4. Place your startup disk in drive A.
    5. On the File menu, click Open, type a:config.sys in the File Name box, and then click Open.
    6. Click the pointer at the end of the last line of text, press ENTER to start a new line, and then on the Edit menu, click Paste.
    7. Change the folder path for CD-ROM driver file to drive A. The following table shows the original line to load the CD-ROM driver file and the new line after you edit it:
            Original line                           Edited line      ---------------------------------------------------------------------      device=c:\cdrom\cdrom.sys /d:mscd001   device=a:\cdrom.sys                                                /d:mscd001								
    8. On the File menu, click Exit, and then click Yes when prompted to save changes.
Note that some CD-ROM drives are attached to sound cards. If this is thecase, you need to load the sound drivers before the CD-ROM driver. Forinformation on how to load your sound driver, check the sound carddocumentation or contact the sound card manufacturer.
  1. Edit the Autoexec.bat file to include the entry for the Mscdex.exe driver. To do so, follow these steps:

    1. Click Start, click Run, type sysedit in the Open box, and then click OK.
    2. Click the Autoexec.bat title bar, find the line that loads the Mscdex.exe file, drag the pointer to select the line text, and then click Copy on the Edit menu. Note the name and path of the Mscdex.exe file.
    3. Click Start, point to Programs, click Accessories, and then click Notepad.
    4. Place your startup disk in drive A.
    5. If there is an Autoexec.bat file on the floppy disk, click Open on the File menu, type a:autoexec.bat in the File Name box, and then click Open.
    6. Click the pointer at the end of the last line of text, press ENTER to start a new line, and then on the Edit menu, click Paste.
    7. If another line is present that contains Mscdex.exe, type rem at the beginning of the line.
    8. If the following text appears at the beginning of the line, select the text, and then press DELETE:
      REM - by Windows Setup -
    9. Change the folder path for the Mscdex.exe file to drive A. The following table shows the original line to load the Mscdex.exe file and the new line after you edit it:
            Original line                              Edited line      ---------------------------------------------------------------------      c:\windows\command\mscdex.exe /d:mscd001   a:\mscdex.exe /d:mscd001								
    10. On the File menu, click Exit, then click Yes when prompted to save changes, and then save to the floppy disk as autoexec.bat.
  2. Place the CD-ROM driver and Mscdex.exe files on your startup disk. To do so, follow these steps:

    1. Click Start, point to Programs, and then click MS-DOS Prompt.
    2. Type each of the following lines, pressing ENTER after each line:
      <drive1>: cd\<cdpath> copy <cddrive> a: <drive2>: cd\<windows>\command copy mscdex.exe a:
      where <drive1> is the drive letter of the drive containing the CD-ROM driver files, <cdpath> is the name of the folder containing your MS-DOS-based CD-ROM driver file, and <drive2> is the drive letter of the drive containig the Windows folder.
The Windows 98 Startup disk includes drivers to load many IntegratedDrive Electronics (IDE) and Small Computer System Interface (SCSI)CD-ROM drives.

Install Appropriate MS-DOS-based CD-ROM Drivers

If you have updated your CD-ROM drive, but not updated your MS-DOS CD-ROMdrivers, install the drivers from Command Prompt Only and then move theMscdex.exe line from the Autoexec.bat file to the Dosstart.bat file. To doso, follow these steps:
  1. Restart your computer. When you see the "Starting Windows 95" message, press the F8 key and then choose Command Prompt Only from the Startup menu.
  2. Follow the instructions from your CD-ROM manufacturer to install your MS-DOS-based CD-ROM drivers. Restart your computer when prompted.
  3. Once you have verified that the correct drivers are loaded and working correctly, move the driver information from the Autoexec.bat file to the Dosstart.bat file. To do so, follow these steps:

    1. Click Start, click Run, type sysedit in the Open box, and then click OK.
    2. Click the Autoexec.bat title bar, find the line that loads the Mscdex.exe file, drag the pointer to select the line text, and then click Copy on the Edit menu.
    3. Type rem at the beginning of the line that contains the Mscdex.exe file, click Exit on the File menu, and then click Yes when prompted to save changes to the Autoexec.bat file.
    4. Click Start, point to Programs, click Accessories, and then click Notepad.
    5. On the File menu, click Open, type c:\windows\dosstart.bat in the File Name box, and then click Open. If you receive an message indicating that the file does not exist, click OK, and then click New on the File menu.
    6. Click the pointer at the end of the last line of text, press ENTER to start a new line, and then on the Edit menu, click Paste.
    7. If another line is present that contains the Mscdex.exe file, type rem at the beginning of the line.
    8. On the File menu, click Save As, type c:\windows\dosstart.bat , click Save, and then click Exit on the File menu.
MORE INFORMATION
Windows does not include real-mode CD-ROM drivers. If you need accessto the CD-ROM drive when you boot to a Windows command prompt or whenyou restart the computer in MS-DOS mode, you must use the real-mode CD-ROMdriver included with the CD-ROM drive. For information about how toobtain, install, or configure the real-mode CD-ROM driver, consult thedocumentation included with the drive, or contact the drive's manufacturer.

Windows does include an MSCDEX driver that is located in theWindows\Command folder. If you must use a real-mode MSCDEX driver, youshould use the driver in the Windows\Command folder instead of the driverincluded with the CD-ROM drive.

The real-mode CD-ROM and MSCDEX drivers can be loaded from severaldifferent locations, depending on the reason they are being loaded. If youare loading the real-mode drivers because you need access to the CD-ROMdrive when you boot to a Windows 95 command prompt, the drivers must beloaded from the Config.sys and Autoexec.bat files in the root folder ofthe boot drive. If you are booting to a Windows command prompt from afloppy disk instead of a hard disk, the drivers must be loaded from theConfig.sys and Autoexec.bat files on the floppy disk.

If you are loading the real-mode drivers because you are restarting thecomputer in MS-DOS mode, the drivers can be loaded from either of thefollowing locations:
  • The Config.sys and Autoexec.bat files in the root folder of the boot drive.
  • The custom Config.sys and Autoexec.bat files that you specify in the properties for the program you are running in MS-DOS mode, the properties for a shortcut that starts the program you are running in MS-DOS mode, or the properties for the "Exit to Dos.pif" file that is used to start Windows in MS-DOS mode.
If you are restarting the computer in MS-DOS mode, you can also loadMSCDEX from the Dosstart.bat file in the Windows folder. This file is usedwhen you restart the computer in MS-DOS mode, but it is not used when youboot to a Windows command prompt or start Windows normally. If thisfile does not already exist in the Windows folder, you must create thefile manually.

NOTE: When you install Windows, Setup disables (remarks out) theexisting Mscdex.exe line in the Autoexec.bat file if it detects a CD-ROMdrive for which Windows includes a protected-mode driver. Therefore,when you boot to a command prompt or restart the computer in MS-DOS mode,MSCDEX is not available. To make MSCDEX available, enable the existingMscdex.exe line in the Autoexec.bat file. You may also need to modify theline so that it loads the MSCDEX driver from the Windows\Command folderinstead of the driver included with the CD-ROM drive.
w95hw
Właściwości

Identyfikator artykułu: 135174 — ostatni przegląd: 12/04/2015 11:51:07 — zmiana: 1.4

  • Microsoft Windows 95
  • Microsoft Windows 98 Standard Edition
  • kbnosurvey kbarchive kbenv kbfaq kbprb KB135174
Opinia