|
Answer» I am pretty new to writing batch files and I've been given the task of writing a batch file that prompts the user to choose between booting (RUNNING) several different network capable Ghost start-up utilities. I have gone about this 2 different ways so far. I started out using a menu based in the config.sys file. But then I decided to try out the choice function in the autoexec.bat file. I like this option more, but I can't seem to figure out how to load the appropriate devices through autoexec.bat. The config.sys file has been the only way I've been able to get this to work so far, so I went back to it. This is my Config.sys file: ------------------------------------------------------------ [menu] menuitem=DOSBOOT, Start this computer with MSDOS and Utilities menuitem=BR57BOOT, Start this computer with Broadcom b57 Ghost Boot Disk menuitem=BR44BOOT, Start this computer with Broadcom b44 Ghost Boot Disk menuitem=GHOST, Run the Ghost Utility
[DOSBOOT]
[BR57BOOT] DEVICE=\boot\net\protman.dos /I:\boot\net DEVICE=\boot\net\dis_pkt.dos DEVICE=\boot\net\B57.dos
[BR44BOOT]
[GHOST]
[COMMON] SHELL=\boot\command.com /p LASTDRIVE = Z
------------------------------------------------------------------- The devices under the BR57BOOT are what I need loaded. Is there any way for me to load those through autoexec.bat? Here is my autoexec.bat file: ----------------------------------------------------------------- @echo off SET TZ=GHO+08:00 prompt $p$g
SET PATH=c:\boot;c:\boot\ghost;c:\boot\net
if %config% == DOSBOOT goto DOSBOOT if %config% == BR57BOOT goto BR57BOOT if %config% == BR44BOOT goto BR44BOOT if %config% == GHOST goto GHOST
::ECHO 1. Start this computer with MSDOS and Utilities ::ECHO 2. Start this computer with Broadcom b57 Ghost Boot Disk ::ECHO 3. Start this computer with Broadcom b44 Ghost Boot Disk ::ECHO 4. Quit ::CHOICE /C:1234 /N /T:4,30 ENTER selection: ::IF ERRORLEVEL == 4 GOTO RUN_QUIT ::IF ERRORLEVEL == 3 GOTO BR44BOOT ::IF ERRORLEVEL == 2 GOTO BR57BOOT ::IF ERRORLEVEL == 1 GOTO DOSBOOT
:DOSBOOT call msdos.bat goto END
:BR57BOOT call broadb57.bat goto END
:BR44BOOT call broadb44.bat goto END
:GHOST call ghost.bat goto END
:FAILED echo Unknown boot menu selection goto END
:END -------------------------------------------------------------------- by the way, I'm booting from a USB flash drive. Any help WOULD be much appreciated.The autoexec.bat and config.sys files are not interchangeable.
The config.sys file consists of directives to configure your hardware devices and DOS itself. It is read once during boot and is not an executable file.
The autoexec.bat runs after the boot and can be used for any startup commands (ie. loading TSR programs, starting the network, even starting a database server). It is executed just like any bat file is.
Device drivers are not executable code and run as extensions to DOS itself.
In most cases, DOS based systems run with both files so as to customize your PC experience. (Wow!, did I write that? )Quote In most cases, DOS based systems run with both files so as to customize your PC experience
Amazing! I see a future for you.QuoteAmazing! I see a future for you.
Good. I enjoy writing fiction. Maybe some day I can write for the Microsoft Press OFFICE. Then you will be known as $idewinder !
|