Help - Search - Members - Calendar
Full Version: Choice and Default option
The CD Forum > The CD Forum > Bootable CDs
music5_5
Hi Everyone,

I have very basic bootdisk which includes autoexec.bat and config.sys files. Once my PC boots with this disk then you are presented with 9 different choices (different NIC and Motherboard type) and user has to select one of them and it will load NIC driver.

Now I have used Pciscan.exe which will automatically detect the NIC and load the appropriate driver for that NIC and this option works right now.

Enough of the background, here is my question:

I want to add choice.com into that disk and make one of the option to be used as a default option, just in case if user does not hit enter key.

I don't know that how and where I can place the choice.com with proper syntax so that my bootdisk boots PC with highlighted option (that I want to be default selection) and after few seconds it will automatically execute that menu choice.

Any help on this will be greatly appreciated.

Thanks,
Ed_P
QUOTE (music5_5 @ May 29 2009, 12:14 PM) *
I don't know that how and where I can place the choice.com with proper syntax so that my bootdisk boots PC with highlighted option (that I want to be default selection) and after few seconds it will automatically execute that menu choice.

I recommend you put CHOICE.COM in the root along with AUTOEXEC.BAT and CONFIG.SYS. A simple execution of CHOICE /? will show you it's options. Basically you want something like:

CODE
echo.
echo -- NIC menu --
echo.
echo 1. NIC 1
echo 2. NIC 2
:
:
CHOICE /C:123456789 /T:1,30 Select NIC and mainboard (Default 1):
if errorlevel 9 echo Invalid option
if errorlevel 8 goto NIC9
if errorlevel 7 goto NIC8
:
:
if errorlevel 1 goto NIC2
if errorlevel 0 goto NIC1

Note: Choice responses are relative to 0.

BTW You can also create a menu in CONFIG.SYS without using CHOICE.COM. I use this CONFIG.SYS menu on one of my USB sticks;

CODE
[Menu]
menucolor=15,1
menuitem=GRUB,BartPE
menuitem=DI,DOS Drive Image
menuitem=PM,DOS Partition Magic
menuitem=USB,For systems with a USB CD or DVD
menuitem=IDE,For systems with an IDE/Atapi CD or DVD (Default)
menuitem=SCSI,For systems with an Adaptec UW (SCSI) CD or DVD
menuitem=LVD,For systems with an Adaptec U2 (LVD) CD or DVD
menuitem=DOS,Exit
menudefault=IDE,10

You could set up something similar for your NICs. If no changes are needed in the CONFIG.SYS for the NICs the option choosen can be tested in the AUTOEXEC.BAT can by testing for the value of %config%. In my AUTOEXEC.BAT I have:

CODE
if "%config%"=="DI" call \Boot\DI.bat
if "%config%"=="PM" call \Boot\PM.bat
if not "%config%"=="DOS" \Boot\Menu.bat


hth
music5_5

Thanks for your help. I went with second choice which is modification of config.sys (menu default and timer) and tested and it works great.

One more quick question if you have used in your boot disk:

I am not sure if it is possible but I wanted ghost to be loaded automatically (this part works) up to that screen where it sits and ask for "GhostCast Session Name to Join"

Thanks,
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.