Jump to content

CONFIG.INF VS CONFIG-EXTRA.INF


SKiTLz

Recommended Posts

Just wondering what the purpose of the CONFIG-EXTRA.INF file is.

From what I can see the contents of CONFIG.INF and CONFIG-EXTRA.INF are the same. Not only that but mkimg.cmd appears to just overwrite CONFIG-EXTRA.INF anyways.

Just trying to learn the WinPE (Microsoft) build process to better customize it.

Cheers

Link to comment
Share on other sites


  • 4 weeks later...

If you take a closer look at MKIMG.CMD you'll see that after overwriting config-extra.inf, mkimg.cmd uses bldini.exe to add additional entries to config-extra.inf

REM
REM initialize config-extra.inf
REM
set ADDREG="Add Registry Existing"
set CONFIG_EXTRA=config-extra.inf
copy config.inf config-extra.inf 1>nul 2>&1

REM
REM Parse the remaining optional arguments
REM

shift

:parseargument
shift
set CURRENTARG=%1

if "%CURRENTARG%" == "" (
goto :donewithargs
)

if /i "%CURRENTARG%" == "/nosxs" (
set SKIPWINSXS=yes
goto :parseargument
) else if /i "%CURRENTARG%" == "/nover" (
set VERSION_CHECK=no
goto :parseargument
) else if /i "%CURRENTARG%" == "/config" (
goto :getconfigfile
) else if /i "%CURRENTARG%" == "/binaries" (
set SRCDIRBINS=yes
goto :getbuildarch
) else if /i "%CURRENTARG%" == "/pnp" (
set EXTRAARGS=%EXTRAARGS% /pnp
bldini %CONFIG_EXTRA% %ADDREG% software .\wpefeat.inf,Pnp
goto :parseargument
) else if /i "%CURRENTARG%" == "/wmi" (
set WMISUPPORT=yes
REM set CONFIGFILE=configwmi.inf
set EXTRAARGS=%EXTRAARGS% /wmi
bldini %CONFIG_EXTRA% %ADDREG% software     .\wpefeat.inf,Wmi
bldini %CONFIG_EXTRA% %ADDREG% software     .\wmisoftware.inf,AddReg
bldini %CONFIG_EXTRA% %ADDREG% setupreg.hiv .\wmisystem.inf,AddReg
goto :parseargument
) else if /i "%CURRENTARG%" == "/nowf" (
set ICF_FEATURE=.\wpefeat.inf,NoIcf
set ICF_SWITCH=
goto :parseargument
) else (
set IMAGENAME=%CURRENTARG%
set CREATEIMG=yes
goto :parseargument
)

REM
REM We are done with args
REM
goto :donewithargs

Looking at the above, you can see that this is where additional entries are added if you specify any of the command line parameters (/PNP, /WMI, /NOWF)

You can verify this by running mkimg with one of the switches (/PNP for example) and compare config.inf to config-extra.inf

I've added commands into mkimg.cmd to add the necessary registry entries for a Ramdrive, because I keep forgetting to add them before calling oscdimg.

I'm actually just about to test this.

[EDIT]

Just realised, for this to actually work, you need to pass an .inf file to bldini, rather than a .reg file.

[/EDIT]

Edited by kiwidave
Link to comment
Share on other sites

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