Home Page 3
Index Page Next Page
Re-installing Windows9x

Mscdex and CD-ROM Access

The Startup Disk Problem - Why Mscdex.exe is Essential

You have reformatted your Hard Disk, inserted the Win95 Startup disk and booted, and want to run the Setup CD. For this you need Mscdex.exe, which is on the Win95 CD - to which you cannot get access without Mscdex.exe. The emergency Startup floppy created by Win95 does not have it. Great thinking! At least Microsoft corrected this in Win98.

Dosstart.bat      Switches      A:\Config.sys & A:\Autoexec.bat      Testing the Boot Disk

The Background
To run a CD-ROM drive in DOS mode, a CD-ROM drive's own Setup disk will insert a line in C:\Config.sys, looking something like:
       DEVICE=C:\CDROM\CDROM.SYS /D:CDROM1 /PIO4
where 'CDROM.SYS' is the driver and '/D:' gives it a Device name ('CDROM1' here). Any other Switches may be ignored for the moment.

The same installation process will insert a line into C:\Autoexec.bat, looking like this:
       C:\WINDOWS\COMMAND\MSCDEX.EXE /D:CDROM1 /L:F /M:32
where MSCDEX.EXE is the file DOS must have to access the drive, /D: matches the Device name given in Config.sys, and /L: assigns a drive Letter (F: in this case). You probably don't need to bother about the other /- switches. Leave them as you find them.

Then Windows installs itself and "rems-out" ('remarks-out', or marks as a 'Remark only') the Mscdex line, thus:
       Rem Deleted by Windows Setup
       Rem C:\WINDOWS\COMMAND\MSCDEX.EXE /D:CDROM1 /L:F /M:32
This disables it at Bootup. ('Rem' tells the computer to ignore what's on that line).
OK, so far? The same principle applies to the Boot Disk. Without a CD-ROM DOS-mode driver and Mscdex one cannot use the Boot floppy to access the CD-Drive. Therefore, if one has just formatted one's hard disk with the Win95 Emergency floppy prior to re-installation, sticking the CD in is useless. The Operating System (DOS) cannot 'see' it because no Device name or drive Letter has been assigned to it. Nor does it have a device Driver. Hence the importance of getting the Boot Disk set up correctly!

Whilst at it, you may as well see that your Dosstart.bat works, too.
You may need it, eg to run the Win95 "Verify" alternative re-install.

Dosstart.bat
Windows Setup does however, copy the original line it disables in Autoexec.bat to the file C:\Windows\Dosstart.bat. But this will only happen if it finds the line in the first place. Some PCs are supplied without the CD-ROM drive's installation disk having been run, assuming the machine will run trouble-free using the Windows9x virtual device drivers (VXDs) only. (As soon as it starts loading itself, Windows9x dumps the DOS 'Real Mode' drivers in Config.sys and Autoexec.bat). Or the CD-ROM drive's Setup may have been run after Windows Setup. So there may be no Dosstart.bat and thus no access to the CD in DOS mode. (The same may happen with Mouse drivers, which Windows Setup also disables in Autoexec.bat and copies to Dosstart.bat if found).

When one selects "Shut Down - Restart the Computer in MS-DOS mode" Windows invokes Dosstart.bat. The computer itself does not reboot, nor does Windows disappear entirely. But all Windows' own Virtual Device drivers are unloaded. This leaves whatever was loaded by Config.sys and Autoexec.bat (any DOS 'Real Mode' drivers are restored), plus whatever is added by Dosstart.bat. If it is empty or missing (because there was nothing to put in it), one may well find no Mouse driver available and no access to the CD-drive.

Note: To return to Windows after shutting down and restarting in DOS-mode don't type:   Win    [Enter]   at the prompt. Instead, use  Ctrl+Alt+Del  to reboot as normal. Or type:   Exit    [Enter] . You'll see "Windows is now restarting".

With the above in mind, you may wish to check your Dosstart.bat. If you haven't got one, you can create it using Notepad. Save in the C:\Windows\ folder. A simple one might read:

       @ECHO OFF
       C:\MOUSE\MOUSE.COM
       C:\WINDOWS\COMMAND\MSCDEX.EXE /D:CDROM1 /L:F /V


     The /V ("Verbose") switch forces the loading process to say what is happening, as a check for errors.
     Other lines may be added by a sound card Setup.

Now to get a bit more technical ...

Switches
The various letters, numbers, etc - often with a forward-slash   /   - typed after a DOS command are called Switches. They tell the command exactly what you want it to do. For more on these see DOS for Windows9x.
  The Switches used with Mscdex are:
       /D: specifies the Device name. Mandatory. Last character must be a number, eg:   MSCD001 , CDROM02.
       /L: specifies the drive Letter. Mandatory. eg:   /L:D , /L:E
       /E  tells Mscdex to use Expanded memory. Optional
       /S  Sharing permitted, on a network. Optional
       /V  Verbose. Tells Mscdex to display details on loading. Optional
       /K  is for accessing CDs with files in the Japanese Kanji format.
       /M: specifies the number of sectors to cache in Memory. Optional. Default = 10, each sector using c 2K of memory.
       /Others are added by the device driver (Cdrom.sys or whatever it is on your setup), not Mscdex. Don't change them.

Now for the important stuff ...

A:\Config.sys & A:\Autoexec.bat
Exactly what goes into Config.sys or Autoexec.bat and in which order has been argued about for decades <sigh>, so I don't expect these suggestions to be unchallenged. Nor will they apply to all setups. Treat them as starting points. They should work, but test them!
A:\Config.sys:

    DEVICE=HIMEM.SYS
    DEVICE=EMM386.EXE NOEMS
    DOS=HIGH,UMB
    DEVICEHIGH=SETVER.EXE
    FILESHIGH=60
    BREAK=ON
    SHELL=COMMAND.COM A:\ /E:256 /P
    DEVICEHIGH=CDROM.SYS /D:CD001
    Country=044,437,country.sys


A:\Autoexec.bat:

       @Echo On
       mode con cp prepare=((437) ega.cpi)
       mode con cp select=437
       keyb uk,,keyboard.sys
       MSCDEX.EXE /D:CD001 /L:F /V
       MOUSE.COM
       PROMPT $P$G


As mentioned elsewhere, DOS is not case-sensitive so a mix of lower-case and capitals doesn't matter.
  • Config.sys tries to provide as much memory as possible by loading the DOS upper-memory managers (Himem.sys and Emm386.exe) and loading Device Drivers 'high'.
  • It bases the CD-ROM line on the one in C:\Config.sys, and sets DOS up for a UK-English environment (country code 437), as does the Autoexec.bat
    (Use 850 in place of 437 for US-English, or omit it as that's the default).
  • Autoexec.bat bases its Mscdex line on the one in C:\Autoexec.bat. Extra switches may be added by the CD-ROM's installation.
  • The /V switch is included as a precaution. So is   @Echo On   which tells DOS to 'echo' (display) the commands on screen, so one can see more of what's happening.
An Alternative "Minimal" Pair with no Memory Managers:
A:\Config.sys:

    SHELL=COMMAND.COM A:\ /E:256 /P
    DEVICE=CDROM.SYS /D:CD001 /PIO4 /Q
A:\Autoexec.bat:

     @Echo On
     MSCDEX.EXE /D:CD001 /L:F /V
     MOUSE.COM
     PROMPT $P$G

And finally ...

Testing the Boot Disk
This is quite simple! To try out your new Boot Disk, stick a software (not audio) CD in the CD drive. If it's one which opens automatically or starts wanting to install a program, close it. Then insert the Boot Disk and reboot the computer. You will see the Mscdex line and others loading, and get an idea from any error messages if something is wrong. (See Boot Sequence below if rebooting simply starts Windows and ignores the floppy).
  1. At the A:\> prompt type:
            C:    [Enter]
  2. If your CD drive Letter is F: type:
            F:    [Enter]
  3. That should suffice, but to be sure type:
            dir /ad /on /p   [Enter]
     
  • You should get the C:\> prompt.
     
  • You should get the F:\> prompt.
     
  • If the CD is being recognised you will see a list of folders in name order ...
    Success! Your Boot Disk works!
Don't forget to label it and make a copy

That wasn't too hard, was it!

The Boot Sequence
If you find you cannot insert a bootable floppy and boot from it because it is ignored, the reason is simple and easily corrected in the majority of PCs. When your computer starts up, it reads information held in the BIOS settings held on the motherboard. One of the settings controls the Boot Sequence, and it is obviously set to go straight to the C: drive (or the CD-ROM in some instances) to find the files for the Operating System. You will need to alter this.
To get to the BIOS Settings menu, press the 'Delete' key as soon as you see things happening. If that doesn't work, see your PC's motherboard manual. If that isn't around try one of the F- keys.
You will get a Menu with various pages offered. To open one press 'Enter'. You can always back out of a page by pressing the 'Escape' key. Find the page with the Boot Sequence setting. You will probably see it as ' C,A ' but whatever it is, write it down so you can remember it. Alternatively, press ' Print Screen ' to have the settings printed out. (You may have to try Shift+PrntScreen or some other combination). It is a Good Idea to have printouts of all BIOS settings anyway.
Use the navigation keys indicated - probably at the bottom - to move to the setting, and then use the keys indicated to scroll through the options until you find one which says ' A,C '. This means: " See if there is a bootable floppy in A: drive, and if so use that to boot. If there is no disk there, go to C: ". If the sequence is ' C,A ' it means: " Try C: first. If it is dead, see if there is a disk in the floppy drive you can use. "
Press Escape to back out to the Menu, then go to the Save Settings option and press Enter. You will be asked to confirm this by pressing the Y (Yes) or N (No) keys. Press Y and the system will reboot and find your Boot Disk.
Unless sure of what you are doing, don't alter other BIOS settings!
Reset the original sequence after testing. If you need to re-enable the A: drive at any time, perform the same BIOS change steps. Unless you want your PC always to check for a boot disk in the floppy drive, do not leave the sequence as ' A,C '.
There may be another setting to check if the floppy drive is working.

Top - Mscdex      Dosstart.bat      Switches      A:\Config.sys & A:\Autoexec.bat      Testing the Boot Disk      Next Page

Main Topic Index


BobMoCo