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]