Help - Search - Members - Calendar
Full Version: Autoexec.bat file scripting help required.
MSFN Forums > Microsoft Software Products - Discussion & Support > Windows 95/98/98SE/ME

   
Google Internet Forums Unattended CD/DVD Guide
myelin
Hello guys

1. I want to know is there any way i can execute a script right at the beginning before Windows98SE boot process starts?

I want to run Puppy Linux, which i can be run by running go.bat (which i made, because it was easy), but i have to go into into its directory and then execute go.bat from DOS prompt everytime i want to run Linux, so is there any way to make it run before windows; if i press yes, and if i press no then it boots to Windows. Any lines which i can add to grub? or is there something else?

Thanks. smile.gif
jaclaz
Well, of course you can do it BOTH ways, i.e. add an entry in Grub4dos for the two os and boot from it, or make some changes in autoexec.bat to have a choice when 98 boots.

You need either CHOICE.COM (included in DOS/Win9x) or CHOIX.COM, see here:
http://www.msfn.org/board/index.php?showtopic=81722

In your case will be something like this:
CODE
ECHO   Which OS do you want to load?
ECHO.
ECHO    1. Puppy Linux
ECHO.
ECHO    2. Windows 98
ECHO.
ECHO.
CHOICE /C:12 /N Please choose a menu option (1 or 2):
IF ERRORLEVEL == 2 GOTO :SKIP
IF ERRORLEVEL == 1 GOTO :PUPPY

:PUPPY
CD "C:\your directory"
go.bat
EXIT

:SKIP
::put your normal autoexec.bat lines here:
.....
.....
.....
win.com


You will need to edit MSDOS.SYS as to start Win9x with no GUI:
http://www.annoyances.org/exec/show/article07-021
BootGUI=0

Or you can use the CONFIG.SYS method:
http://tldp.org/HOWTO/text/Loadlin+Win95-98-ME

(just think as your "go.bat" as the "linux.bat" referenced in the howto)

jaclaz
myelin
The first method was very simple and easy and it worked like a charm. Thanks for writing the whole script for me. smile.gif
jaclaz
You are welcome. smile.gif

jaclaz
Google Internet Forums Unattended CD/DVD Guide
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.