Win98 is automatically altering autoexec.bat

February 7, 2011 at 19:26:52
Specs: Windows 98SE, AMD Athlon/384MB
I am using Windows 98 on an older PC to boot into DOS (BootGUI=0 in MSDOS.SYS). I can then use the Config.sys 'menuitem=aaa' function and %config% variable in Autoexec.bat to select one of a number of bootup configurations - including Windows.
This works well for all configurations until I boot into Windows. On the next startup I find that my Autoexec.bat file has been altered by the operating system. Most frustrating!!! Specifically the line "C:\SBPCI\SBINIT.COM" to initialise my SoundBlaster Vibra128 card in Legacy mode for DOS configurations, is replaced by "SET SBPCI=C:\SBPCI". This is despite the SBPCI environment variable being set two lines above.
Tahnks for any help in advance.


See More: Win98 is automatically altering autoexec.bat

Report •

#1
February 8, 2011 at 01:09:38
"...On the next startup I find that my Autoexec.bat file has been altered by the operating system..."

... guessing you've tried altering the attributes to "read only"
************* ********** **********

... more of a question than an answer:

... @ reboot does the system compare autoexec.bat + config.sys in C:\windows\command folder?

... suggestion: perhaps copy your edited files (also) to that location(?)

.
Angel Decoy
... Posting is provided "AS IS" with no warranties
http://img132.imageshack.us/img132/...
Grrrr... ...im


Report •

#2
February 8, 2011 at 11:04:43
I wonder if it's sbinit that's rewriting it. You might temporarily REM out that line--or any other that may be doing it--and see if autoexec.bat remains unchanged.

Also check if there's a dosstart.bat in your windows directory. That's the file that runs when you choose 'restart in msdos mode' from the shutdown menu. Dos/legacy stuff like mscdex, a mouse driver or dos sound setup is often placed there. I'll bet you'll see sbinit there.

How about those Packers Steelers Packers!


Report •

#3
February 10, 2011 at 02:56:50
Thanks for your suggestions mavis007. Unfortunately, the Read-Only attribute did not prevent the unwanted file change. It appears to happen during the windows shut-down sequence because I can view / edit the unaltered file when windows first starts (after having corrected the file in a DOS session.)

There was no Autoexec.bat or Config.sys in my C:Windows\Command folder. As per your second suggestion I placed copies there, but the problem persists. The copy in the \\Command folder was not affected.


Report •

Related Solutions

#4
February 10, 2011 at 03:14:35
Thanks for your input DAVEINCAPS. I did REM out the SBINIT line but the system altered the line anyway, just like before, resulting in two consecutive "SET SBPCI=C:\SBPCI" statements instead of one "SET SBPCI=C:\SBPCI" statement followed by REM C:\SBPCI\SBINIT.COM on the next line.

You are correct about the DOSSTART.BAT file. It has all the correct statements in it, except MSCDEX - but that's another issue. However they are not affected by this problem as I am not restarting DOS from Windows - I am cold starting into DOS or Windows selectively.


Report •

#5
February 10, 2011 at 04:52:28
... it been awhile for me with win98 hope you do'nt mind me throwing in suggestions:

C:\Windows\Command\Ebd folder(?)

... might be worth looking in (run) MSCONFIG, clicking on the WIN.INI (tab) for relevant entries


.
Angel Decoy
... Posting is provided "AS IS" with no warranties
http://img132.imageshack.us/img132/...
Grrrr... ...im


Report •

#6
February 10, 2011 at 22:03:19
I still think something in autoexec.bat or maybe config.sys is making the changes. You may want to post back their contents.

Or sometimes a dos program will have it's own versions of those files and make the changes if you reboot using the program's desktop icon. Are there other autoexec and config files in C:\ ? If so, what are their extensions?

How about those Packers Steelers Packers!


Report •

#7
February 13, 2011 at 18:53:53
Hi Mavis 007,

The C:\Windows\Command\Ebd folder contains versions of Autoexec & Config required to make an emergency boot disk for Win 98. I can see no commands there that would contribute to the problem.

I had a good look through the WIN.INI file and found nothing relevant there either.

I think I'll just have to live with this minor annoyance. Booting into Windows is not affected anyway and I can run SBINIT manually from the command line when I boot into DOS.

Thanks for your help.


Report •

#8
February 13, 2011 at 19:55:13
Hi DAVEINCAPS,

I am aware of the private Autoexec & Config settings in a DOS Desktop icon *.PIF (Program Information File) but I am not using this method to run DOS programs.

There is only one Config.sys and one Autoexec.bat in C:\ and I have included them below.

The problem is in line 25 of Autoexec.bat. Choosing menuitem "WIN" (%config%=="WIN")results in the line being changed from "C:\SBPCI\SBINIT.COM" to "SET SBPCI=C:\SBPCI" even though, as you can see, the environment variable "SBPCI" has already been set at line 23.

*************************************************
CONFIG.SYS:

[menu]
menuitem=DOS, DOS Prompt Only.
menuitem=DON, DOS - No EMS.
menuitem=DSH, DOSSHELL Interface.
menuitem=WIN, Windows 98 Interface.
menuitem=WSM, Windows 98 - Safe Mode.
menudefault=WIN,20
menucolor=14,0

[common]
DEVICE=C:\WINDOWS\HIMEM.SYS/v

[DOS]
DEVICE=C:\WINDOWS\EMM386.EXE/ram/highscan/v
DOS=HIGH,UMB
DEVICE=E:\DOS_SYS\DRIVERS\CDROM\GSCDROM.SYS/D:MSCD001

[DON]
DEVICE=C:\WINDOWS\EMM386.EXE/noems/novcpi/v
DOS=HIGH,UMB
DEVICEHIGH=E:\DOS_SYS\DRIVERS\CDROM\GSCDROM.SYS/D:MSCD001

[DSH]
DEVICE=C:\WINDOWS\EMM386.EXE/ram/highscan/v
DOS=HIGH,UMB
DEVICE=E:\DOS_SYS\DRIVERS\CDROM\GSCDROM.SYS/D:MSCD001

[WIN]
DEVICE=C:\WINDOWS\EMM386.EXE

[WSM]
DEVICE=C:\WINDOWS\EMM386.EXE

********************************************

AUTOEXEC.BAT:

@echo off
echo You have chosen configuration %config%
echo
pause
SET TEMP=D:\TEMP
SET TMP=D:\TEMP
GOTO %config%

:DOS
echo DOS Prompt Only
GOTO DSH1

:DON
echo DOS Prompt - No EMS
GOTO DSH1

:DSH
echo DOSSHELL Interface
:DSH1
path=E:\DOS_SYS
SET CADD_INIT= 105h
SET BLASTER=A220 I7 D1 H7 P330 T6
SET SBPCI=C:\SBPCI
C:\SBPCI\SBLOAD.EXE
C:\SBPCI\SBINIT.COM
LOADHIGH MSCDEX /D:MSCD001 /L:I
E:\DOS_SYS\DRIVERS\MOUSE\MOUSE.COM
IF "%config%"=="DON" GOTO DEND
LOADHIGH DOSKEY
IF "%config%"=="DOS" GOTO DEND
DOSSHELL /g:res[m2]
GOTO DEND

:WIN
win
GOTO WEND

:WSM
win/d:m
GOTO WEND

:DEND
echo on

:WEND

*******************************************

While it would be of interest to know why this is happening on what is after all an old unsupported OS, I think I can live with this minor annoyance. Booting into Windows is not affected anyway and I can run SBINIT manually from the command line when I boot into DOS.

Thanks for your help.


Report •

#9
February 14, 2011 at 00:54:23
I don't see any obvious problems.

Did you also try REMing the sbload line just to see if that was the one causing the rewriting?

It's probably not a factor here but I've found that when SB cards are setup in dosstart.bat (when exiting from windows to dos) the drivers won't load if 'PnP OS' is enabled in cmos/bios setup. I don't know if that happens when booting straight to dos

This space for rent


Report •

Ask Question