VOGONS


First post, by eddman

User metadata
Rank Oldbie
Rank
Oldbie

I use a boot menu to boot into windows 98 and different DOS configs. Sometimes, usually at the worst times, I boot into DOS and notice there is no CD drive, and then see that line has been added to autoexec.bat. I usually stay in the windows environment and don't boot into DOS that often, so haven't been able to catch what activity causes it.

Unless I'm hallucinating, I'm pretty sure it still gets modified even when the file is set to read-only. Even if I'm wrong, I'd still like to know the exact trigger so that I can avoid doing it unknowingly.

EDIT: I'm aware of DOS mode shortcuts.

Last edited by eddman on 2026-03-11, 22:22. Edited 1 time in total.

Reply 1 of 9, by NeoG_

User metadata
Rank Oldbie
Rank
Oldbie

The most stable way to store your DOS configuration is inside a DOS mode shortcut and keep the windows 98 autoexec/config files empty. That way they are completely separated from any changes made by windows or windows apps.

It does mean a change to how you access the DOS environment, you use the shortcut to restart the computer into DOS mode and use the WIN command to restart into windows 98 instead of having a menu every time the computer starts.

98/DOS Rig: BabyAT AladdinV, K6-2+/550, V3 2000, 128MB PC100, 20GB HDD, 128GB SD2IDE, SB Live!, SB16-SCSI, PicoGUS, WP32 McCake, iNFRA CD, ZIP100
XP Rig: Lian Li PC-10 ATX, Gigabyte X38-DQ6, Core2Duo E6850, ATi HD5870, 2GB DDR2, 2TB HDD, X-Fi XtremeGamer

Reply 2 of 9, by LSS10999

User metadata
Rank Oldbie
Rank
Oldbie

Check System properties and see if you're in MS-DOS Compatibility Mode. Usually that's the reason why CD drive "disappeared".

Windows normally has its own 32-bit disk driver for handling disks including CD, but if you're in MS-DOS Compatibility Mode it will rely on DOS mode drivers (CD driver and MSCDEX). Normally you shouldn't load any DOS mode CD drivers as that will definitely force MS-DOS Compatibility Mode, but VIDE-CDD is an exception -- it can hand over control of CD to Windows so it will not lead to MS-DOS Comptibility Mode.

If you did not load any TSR that Windows doesn't like and have never modified CONFIG.SYS/AUTOEXEC.BAT, chances are the boot sector is messed up by something (so-called "boot sector virus"). I've seen this happened on my very first PCs a few times, and that was a long time ago.

As for the original question (REM - by Windows Setup), I think Windows Setup would check and automatically add those on lines that are known to likely cause problems with Windows. You should always back up CONFIG.SYS/AUTOEXEC.BAT when installing/reinstalling.

Personally I'm experimenting with leaving base AUTOEXEC.BAT mostly clean and put commands meant for different startup configurations in separate BATs that gets CALLed during AUTOEXEC.BAT. Sadly this does not exempt other BATs from being modified, as Windows Setup appears to statically check every line for potential remarks and will go into any CALLed batch files it encountered and modify lines in those files as well.

Reply 3 of 9, by eddman

User metadata
Rank Oldbie
Rank
Oldbie
LSS10999 wrote on 2026-03-12, 05:17:

Check System properties and see if you're in MS-DOS Compatibility Mode. Usually that's the reason why CD drive "disappeared".

I think you misread. The CD drive disappears in DOS, not windows. It happens because "rem - by windows setup" gets added to MSCDEX in autoexec.bat.

I do not load anything for windows in CONFIG.SYS/AUTOEXEC.BAT. The windows boot option basically goes straight to windows; I've separated the DOS and windows sections. Windows is not in MS-DOS Compatibility Mode.

LSS10999 wrote on 2026-03-12, 05:17:

As for the original question (REM - by Windows Setup), I think Windows Setup would check and automatically add those on lines that are known to likely cause problems with Windows. You should always back up CONFIG.SYS/AUTOEXEC.BAT when installing/reinstalling.

but what is causing Windows Setup to run? When is windows setup triggered? Installing/reinstalling what? "rem - by windows setup" seems to be added randomly, long after windows has been installed.

Reply 4 of 9, by NeoG_

User metadata
Rank Oldbie
Rank
Oldbie

OK now I understand what is happening - I don't think you can stop it because it's triggered by different windows functions like driver installers, PnP detection, add new hardware etc. Maybe other reasons too that I'm not aware of.

Luckily it's easy to fix, just rename or make a copy of MSCDEX.EXE to another name and use that instead. Windows setup management will no longer think it's a line that needs to be optimised out of existence.

98/DOS Rig: BabyAT AladdinV, K6-2+/550, V3 2000, 128MB PC100, 20GB HDD, 128GB SD2IDE, SB Live!, SB16-SCSI, PicoGUS, WP32 McCake, iNFRA CD, ZIP100
XP Rig: Lian Li PC-10 ATX, Gigabyte X38-DQ6, Core2Duo E6850, ATi HD5870, 2GB DDR2, 2TB HDD, X-Fi XtremeGamer

Reply 5 of 9, by eddman

User metadata
Rank Oldbie
Rank
Oldbie
NeoG_ wrote on 2026-03-12, 12:21:

Luckily it's easy to fix, just rename or make a copy of MSCDEX.EXE to another name and use that instead. Windows setup management will no longer think it's a line that needs to be optimised out of existence.

Ha, pretty clever, thanks. Made a copy named "MSCDEX2.EXE", will see how it goes. Wonder if windows cares only about the exact filename or just text strings.

Reply 6 of 9, by leileilol

User metadata
Rank l33t++
Rank
l33t++

There were Win98 RC builds that didn't do this and sent the OS into BSOD hell. That got false PCem bug reports years ago.

Windows Me goes the extra mile and flushes the bat/sys entirely!!!!

apsosig.png
long live PCem
FUCK "AI"

Reply 7 of 9, by LSS10999

User metadata
Rank Oldbie
Rank
Oldbie

I recall even Win95 does this as well, remarking some sensitive CONFIG/AUTOEXEC lines.

As for Win3.x, it will not attempt to modify CONFIG/AUTOEXEC if you have multiple startup configurations, and will provide a CONFIG.WIN/AUTOEXEC.WIN for you to manually merge the changes appropriately.

This behavior is gone with Win9x, unfortunately, as it'll attempt to modify everything, including external batch files that get CALLed by AUTOEXEC if you have any.

Reply 8 of 9, by maxtherabbit

User metadata
Rank l33t
Rank
l33t

I can't say *exactly* what triggers it, but IME it only occurs after a driver or hardware change.

Reply 9 of 9, by jakethompson1

User metadata
Rank l33t
Rank
l33t

The way this was intended to be handled is that you put mscdex in dosstart.bat, not autoexec.bat, and use "restart in MS-DOS mode" from Win95 when you want to use it.

It makes sense that Win95 comments out mscdex after it gains protected mode CD-ROM support. The way the OEM's "CD-ROM Setup Boot Disk" was supposed to work was to put the driver in config.sys and mscdex in autoexec.bat. On the first boot after setup, Win95 has no protected mode CD-ROM support and depends on MSCDEX. After it gains it (esdi_506.pdr and all that) it will comment out mscdex.

Incidentally, if you do load mscdex from dosstart.bat, then exit and Win95 reloads, MSCDEX will still be in memory--annoying. The easiest way to avert that is to load smartdrv in dosstart.bat as well; in that case, the machine reboots when you exit.

Vide-cdd is not special in being ok to load in config.sys on every boot despite going into Windows. In my experience it's been all (ATAPI, at least) CD-ROM drivers that work that way. There is a list of explicitly safe drivers in c:\windows\ios.ini. Because mscdex is not loaded, it doesn't hurt anything having the config.sys portion of the driver in memory. On irc the other day we wondered how close Microsoft came to bundling a Devload-type utility with Win95. That would've allowed moving the loading of the .sys cd-rom driver to dosstart.bat as well.