|
Answer» First off, I'll give you a little background on what I am trying to accomplish. I am making a USB Flash Drive bootable and loading it with DOS drivers for all the network cards on our network. The purpose of this being, of course, to run Ghost.
At first this wasn't a problem. I made the thing bootable and it ran Ghost just fine, but it turns out I need it to do two different types of configuration. One for mapping a network drive and another for multicasting. They require different drivers and different files to be loaded. The solution I thought was simple, create a startup menu in Config.sys to allow the user (usually me) to select which network adapter should be used. Then pull that selection into Autoexec.bat to run the correct series of commands.
Now onto the real problem. I have two if statements in Autoexec that don't seem to be running correctly and I'm not sure why. I think all of my syntax is correct but I cannot be certain. Here is the text from both config.sys and autoexec.bat:
CONFIG.SYS ------------------------------------------------
[menu] submenu=MAP, Map Novell network drive submenu=MULTI, Multi-cast session
[MAP] menuitem=B57MAP, Broadcom NetXtreme Gigabit Ethernet submenu=menu, Return to the Main Menu
[MULTI] menuitem=B57, Broadcom NetXtreme Gigabit Ethernet menuitem=E1000, Intel Pro/1000 submenu=menu, Return to the Main Menu
[B57] DEVICE=\B57\protman.dos /I:\B57 DEVICE=\B57\dis_pkt.dos DEVICE=\B57\B57.dos
[E1000] DEVICE=\E1000\protman.dos /I:\E1000 DEVICE=\E1000\dis_pkt.dos DEVICE=\E1000\E1000.dos
[B57MAP]
[COMMON] LASTDRIVE = Z
------------------------------------------- AUTOEXEC.BAT ------------------------------------------- echo off SET TZ=GHO+05:00 prompt $p$g MOUSE.COM
if "%config%" == "MAP" goto MAPBOOT if "%config%" == "MULTI" goto MULTIBOOT
goto END
:MAPBOOT LSL.COM E100BODI.COM IPXODI.COM VLM.EXE f: LOGIN ICAST MAP I:=\\vantage2\imagecast\ghost\images\ i: i:\ghost\ghost goto END
:MULTIBOOT \net\netbind.com cd \ghost echo Loading... GHOST.EXE goto END
:END echo The End --------------------------------------
One final note, my autoexec and config files are not finished as far as being able to access the right files. The point is that autoexec for some reason does not follow the programming route as it should. Any help in this matter would be greatly APPRECIATED. THANKS.
Eric Your operating system is :-?
Can't be XP as that doesn't access Autoexec.bat or Config.sysI'm running Windows XP Professional but that doesn't matter. I'm booting the USB Flash drive into DOS that I got from a Win98 boot disk. I'm not sure what version of DOS it is.
On another note, I changed my Autoexec file a little BIT and got things to work, just not the WAY that I wanted. Instead of this if statement: if "%config%" == "MULTI" goto MULTIBOOT I called the final selection after the submenu. I.E. B57 with: if "%config%" == "B57" goto MULTIBOOT. I guess the config variable doesn't change to a submenu selection, only the final selection. If anyone knows a way to make it so I don't have to type out an if statement for every final menu selection I would appreciate knowing it. I'm going to have somewhere around 10 or so different network adapters listed in this config file but I only need the autoexec to do 1 of 2 things based upon the first menu selection. Maybe there's a better way or coding the autoexec. I don't know, but if you do I would appreciate it. Thanks.
|