VOGONS


First post, by G-Man

User metadata
Rank Newbie
Rank
Newbie

HI, I have an old machine running Win ME. I am trying to install a CD Rom, I have an auto install disk that writes to the Autoexec.bat and Config.sys all the files needed.
Autoexec.bat
SET windir=C:\WINDOWS
SET winbootdir=C:\WINDOWS
SET COMSPEC=C:\WINDOWS\COMMAND.COM
SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND
SET PROMPT=$p$g
SET TEMP=C:\WINDOWS\TEMP
SET TMP=C:\WINDOWS\TEMP
C:\Windows\Command\MSCDEX.EXE /D:D:CD01
Config.sys
DEVICE=C:\WINDOWS\HIMEM.SYS /TESTMEM:OFF
DEVICEHIGH=C:\WINDOWS\COMMAND\OAKCDROM.SYS /D:CD01
LASTDRIVE=Z

When I reboot the PC Autoexec and Config have gone back to the original files:
Autoexec
SET COMSPEC=C:\WINDOWS\COMMAND.COM
SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND
SET PROMPT=$p$g
SET TEMP=C:\WINDOWS\TEMP
SET TMP=C:\WINDOWS\TEMP
Config
"Empty"

It doesn't matter what I write in the two files it always rewrite back to the original. I have tried read only and hidden but makes no difference.
I read somewhere that If autoexec.bat and config.sys are modified, and the computer is restarted or shutdown, Windows automatically removes any value that is not specified in the registry. Any thoughts. G-man

Reply 1 of 4, by kmeaw

User metadata
Rank Member
Rank
Member

Back up your C:\windows\system\regenv32.exe file and open it in a hex editor. Change the only occurence of "_:\CONFIG.SYS" to something else (like "_:\CONFIG.XXX") and repeat the procedure for "_:\AUTOEXEC.BAT" (change it to "_:\AUTOEXEC.XXX").
Then Windows will stop overwriting those files on every boot.

Reply 2 of 4, by G-Man

User metadata
Rank Newbie
Rank
Newbie

Cheers I'll try that and let you know what happens. G

Reply 3 of 4, by konc

User metadata
Rank l33t
Rank
l33t

Note that if you don't want to use the CDROM under DOS, you don't need MSCDEX and the .SYS files, or the install disk at all.
I'm saying this because I see there is nothing else relevant to DOS in your config & autoexec files, so there is a chance you are not using DOS on this machine.

Reply 4 of 4, by G-Man

User metadata
Rank Newbie
Rank
Newbie

KMEAW, put the regenv32.exe through a Hex Editor and altered the Autoexec.bat to Autoexec.000 as with Confog.sys. This worked and it no longer rewrites on boot.
Thanks for that tip.

KONC, yes don't need DOS, but for some reason it doesn't load the CDRom on boot.
Can load a USB drive so I have access to files. Is there something I am missing with the CDRom.
Thanks for the help. G