Jump to content

Autoexec.bat file scripting help required.


Recommended Posts

Posted

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. :)


Posted (edited)

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:

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

Edited by jaclaz
Posted

The first method was very simple and easy and it worked like a charm. Thanks for writing the whole script for me. :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...