1.

Solve : Help with autoexec.bat and config.sys?

Answer»

This may be beyond the scope here but it's worth a shot.

I have a bootable floppy with an autoexec.bat and config.sys. The autoexec uses variables from menu items selected/defined from the config.sys. I'm now trying to CONVERT these FILES to run under WinPE but am having issues having the autoexec.bat see the config.sys file with the menu from within WinPE, it tells me the label %config% doesn't exist, but I'm actually trying to call config.sys for the menu.
 
So my question is can you link a .bat to a .sys for this type of functionality or is this a 'special' RELATIONSHIP with autoexec.bat and config.sys?

I've included the beginning portions of the files.

config.sys
Code: [Select][MENU]
SUBMENU=UTILS,[DISK UTILITIES]    (FDISK,FORMAT)
REM SUBMENU=1,[DESKTOPS]

[1]
SUBMENU=1a,[DELL COMPUTERS]

[1a]
SUBMENU=1b1, [DELL OptiPlex]
SUBMENU=1b2, [DELL Precision]
SUBMENU=1b3, [DELL Dimension]
SUBMENU=MENU, Return to Main Menu

[1a1]
MENUITEM=005, DELL OptiPlex GX260: Intel Pro/1000 (w/Intel Graphics display)
MENUITEM=032, DELL OptiPlex GX270: Intel Pro/1000 (w/Intel Graphics display)
MENUITEM=040, DELL OptiPlex GX280: Broadcom BCM570x (w/Intel Graphics display)
MENUITEM=010, DELL OptiPlex GX240: 3Com 3C905 (w/ATI Rage 128 Ultra display)
MENUITEM=012, DELL OptiPlex GX111: 3Com 3C905 (w/Intel Graphics display)
MENUITEM=013, DELL OptiPlex GX300: 3Com 3C905 (w/NVIDIA TNT2 Model 64 display)
MENUITEM=031, DELL OptiPlex GX400: 3Com 3C905 (w/NVIDIA TNT2 Model 64 display)
SUBMENU=1b1a, [More OptiPlex COMPUTERS...]
SUBMENU=MENU, Return to Main Menu

[1a1a]
MENUITEM=011, DELL OptiPlex  GX60: Intel Pro/100 (w/Intel Graphics display)
MENUITEM=042, DELL OptiPlex   GX1: 3Com 3C905 (w/ATI RAGE 128 Ultra display)
SUBMENU=1a1, Back...
autoexec.bat
Code: [Select]:****************************************************************************
: SERVER AND SHARE TO CONNECT TO FOR WORKSTATION BUILD FILES
: NOTE- a:\build\LMHOSTS, must have an ENTRY for the IP ADDRESS OF THE SERVER
:****************************************************************************

: SET THE NETWORK CARD PARAMETERS, AND FLAG ANY SPECIAL CONFIGURATIONS, BASED
: ON THE BOOT CONFIGURATION. THE CFG_TYPE IS USED AS THE SUFFIX FOR THE
: ANSWER SOURCE FILE, THE DEFAULT IS CFG_TYPE=0 (IE UNATTEND.0).

set cfg=0
set cfg_type=000
set x_type=0

goto %config%

:fdisk
x:\fdisk
goto end

:format
copy x:\format.com d:\
cls
d:
echo y| x:\format c: /u/v:""
c:
goto end

:quick
copy x:\format.com d:\
cls
d:
echo y| x:\format c: /u/q/v:""
c:
goto end

:005
set cfg_type=005
set drivername=E1000$
set netcard=E1000.DOS
goto common

:010
set cfg_type=010
set x_type=010
set drivername=EL90X$
set netcard=el90x.dos
goto common

:011
set cfg_type=011
set drivername=E100B$
set netcard=e100b.dos
goto common

:012
set cfg_type=012
set drivername=EL90X$
set netcard=el90x.dos
goto common

:013
set cfg_type=013
set drivername=EL90X$
set netcard=el90x.dos
goto common

:031
set cfg_type=031
set drivername=EL90X$
set netcard=el90x.dos
goto common

:032
set cfg_type=032
set drivername=E1000$
set netcard=E1000.DOS
goto common

:040
set cfg_type=040
set x_type=040
set drivername=B57$
set netcard=B57.dos
goto common

:042
set cfg_type=042
set drivername=EL90X$
set netcard=el90x.dos
goto common

:COMMON
: path=x:\;x:\NET
:****************************************************************************

set share=W2KBUILD$

: Prompt for Build Server
:chstart
if %cfg% == S goto Schstart
cls
echo.
echo  Select Appropriate Build Source Server
echo.
echo 1. Server1 - Location 1
echo 2. Server2 - Locaton 2
echo.
a:\build\choice /C:12 Type Choice NumberThere is no relationship between the autoexec.bat and the config.sys files. The config file consists of set of directives to DOS concerning how and what drivers to load, and setting various parameters for DOS itself. The file is not executed so much as read early in the boot process for it's directive information. (it is NOT required).

The autoexec file is a normal batch file that DOS is programmed to run immediately after the command processor (command.com) is loaded. Generally it is used to run terminate and stay resident programs and housekeeping type programs and routines each time a system is booted. (it is NOT required).

Neither file is used on NT machines where they have been replaced by the autoexec.nt and config.nt files. These files serve the same purpose as their DOS counterparts not for Windows, but for the DOS VM.



Discussion

No Comment Found