TUTORIAL: Create perfect Windows Post-Setup using OOBE.cmd

Any way to run the Ninite installer inside the $OEM$ dough?

Create a package to install and download with Windows programs as it is already up to date.
 
Hey, iam new to this, but i followed the whole instructions as far as i need it.
But after Windows Installation, the Post Setup Screen doesnt pop up...

Do i need to enable or disable any options in NTLite?
 
Hello, everyone! I am new to this post-setup process and I was hoping someone could help me with a question. Recently, I downloaded a modified ISO of Windows 11 and exported an edition of Windows. When I opened the install.wim file in NTLite, I noticed that there were a lot of machine commands in the post-setup section. However, I couldn't find the $OEM$ folder in the sources folder inside the ISO. Can anyone explain why I can't see the folder? Obs: I have hidden items enabled by default and the folder is not present, also try to open in NTLite and them add a line into the install.wim and still not creating the $OEM$ folder but integrating the commands to the install.wim.

I try to automate the post-setup in an modified ISO that I create (which is not the case for the topic) and NTLite create the $OEM$ folder inside the sources of this ISO, why in my modified ISO the $OEM$ folder has been created and the downloaded is not been created this folder.

I will attach some screenshots, so you guys could explain to me.
 

Attachments

  • compact02.png
    compact02.png
    43 KB
  • compact.png
    compact.png
    42.4 KB
it isnt there and wasnt included, thats why. it has not been created. Personally i would AVOID downloading someone else's modified iso's as you can never tell what is inside them.
 
I just download to see how they integrate the compact LZX and I notice that the folder $OEM$ has not been created, but when you open the install.wim has all the commands there but even modifying the post-setup the folder is not created, I want to understand why this happen, and I download the ISO just for learn this, to understanding the process to run commands after windows setup
 
I am confused by the screenshots, because I'm not seeing any references to OEM at all, unless it's in the text you censored? I thought the same thing that Taosd said, but it sounded like you were confident in what you were seeing and so I assumed I was missing something. Can you show us specifically what is referencing OEM?
 
Hello, everyone! I am new to this post-setup process and I was hoping someone could help me with a question. Recently, I downloaded a modified ISO of Windows 11 and exported an edition of Windows. When I opened the install.wim file in NTLite, I noticed that there were a lot of machine commands in the post-setup section. However, I couldn't find the $OEM$ folder in the sources folder inside the ISO. Can anyone explain why I can't see the folder? Obs: I have hidden items enabled by default and the folder is not present, also try to open in NTLite and them add a line into the install.wim and still not creating the $OEM$ folder but integrating the commands to the install.wim.

I try to automate the post-setup in an modified ISO that I create (which is not the case for the topic) and NTLite create the $OEM$ folder inside the sources of this ISO, why in my modified ISO the $OEM$ folder has been created and the downloaded is not been created this folder.
SetupComplete.cmd normally lives in %WINDIR%\Setup\Scripts

NTLite writes its own copy under $OEM$\$$\Setup\Scripts to avoid having you mount install.wim, every time you want to update it. This means you can edit SetupComplete or change \Setup\Scripts without opening NTLite.

This custom ISO uses the old method.
Code:
@echo off
%SystemDrive%
cd\
attrib winpepge.sys -s -h
del /f winpepge.sys
rd /s /q $WINDOWS.~BT
rd /s /q $WINDOWS.~LS
rd /s /q %systemdrive%\users\defaultuser0
rd /s /q %systemdrive%\system.sav
sc config sysmain start= disabled
sc config DoSvc start= demand
wmic UserAccount set PasswordExpires=False
label %SystemDrive% Windows X-Lite
compact /c /s /i /a /exe:XPRESS8K "%SystemDrive%\Windows\*"
compact /c /s /i /a /exe:XPRESS8K "%SystemDrive%\Program Files\*"
compact /c /s /i /a /exe:XPRESS8K "%SystemDrive%\Program Files (x86)\*"
shutdown /r /t 8
rmdir /s /q %~dp0
del /q /f "%0"
 
SetupComplete.cmd normally lives in %WINDIR%\Setup\Scripts

NTLite writes its own copy under $OEM$\$$\Setup\Scripts to avoid having you mount install.wim, every time you want to update it. This means you can edit SetupComplete or change \Setup\Scripts without opening NTLite.

This custom ISO uses the old method.
Code:
@echo off
%SystemDrive%
cd\
attrib winpepge.sys -s -h
del /f winpepge.sys
rd /s /q $WINDOWS.~BT
rd /s /q $WINDOWS.~LS
rd /s /q %systemdrive%\users\defaultuser0
rd /s /q %systemdrive%\system.sav
sc config sysmain start= disabled
sc config DoSvc start= demand
wmic UserAccount set PasswordExpires=False
label %SystemDrive% Windows X-Lite
compact /c /s /i /a /exe:XPRESS8K "%SystemDrive%\Windows\*"
compact /c /s /i /a /exe:XPRESS8K "%SystemDrive%\Program Files\*"
compact /c /s /i /a /exe:XPRESS8K "%SystemDrive%\Program Files (x86)\*"
shutdown /r /t 8
rmdir /s /q %~dp0
del /q /f "%0"
Thanks for the answer and for the help garlin
 
For informational purposes, If using the Ventoy tool to boot the Win Setup ISO, you can't use the method laid out in this post to perform the tasks directly from the install media, since when the Win Setup reboots, the ISO is no longer mounted, the step to find the DRIVE that the ESD/WIM/SWM is present on won't find anything, and so any of the steps that rely on the %DRIVE% variable will fail.

The rest of the method works fine, and you can just create the FilesU folder at same level as Scripts folder under $OEM\$$\ , copy all the relevant files there, and in OOBE.cmd replace all occurences of '%DRIVE%\setup' with '%WINDIR%\setup'
 
Small question is there a different configuration in NTLite to run the installation this way (OOBE) because for me it always tries to run "SetupComplete.cmd" I don't really understand how the installation will run the script " $$\setup\Script\OOBE.cmd" Can you enlighten me ?
 
Para fins informativos, se estiver usando a ferramenta Ventoy para inicializar o Win Setup ISO, você não pode usar o método descrito neste post para executar as tarefas diretamente da mídia de instalação, pois quando o Win Setup é reinicializado, o ISO não é mais montado, a etapa para encontrar o DRIVE no qual o ESD/WIM/SWM está presente não encontrará nada e, portanto, qualquer uma das etapas que dependem da variável %DRIVE% falhará.

O restante do método funciona bem e você pode simplesmente criar a pasta FilesU no mesmo nível da pasta Scripts em $OEM\$$\ , copiar todos os arquivos relevantes para lá e, em OOBE.cmd, substituir todas as ocorrências de '%DRIVE% \setup' com '%WINDIR%\setup'
Eu passei por este problema. Poderia postar uma foto de como fez funcionar?
 
I read this tutorial a few times. I follow instruction very carefuully. Afer create an iso. Run it, error come out say can't handle the shutdown and will not continue install. any idea?
 
where to put RunOnceEx_Protector.xml?
If you want to remove Internet Explorer, you can still use this method!
Just protect these files 3 (6) files in components section in NTLite, you don't need to do it manually, just download and use attached preset RunOnceEx_Protector.xml

RunOnceEx_Protector.xml is a partial NTLite preset. You import the XML file from the Preset menu. Load your image, load your working preset, and then double-click RunOnceEx_Protector.xml.

NTLite will ask if you want to overwrite or APPEND this preset - choose append.
 
I added Wi-Fi via unattended.xml to install chocolatey + programs via RunOncex. But in OBBE Windows looks for updates and drivers breaking the script it installs. Is there a way to bypass the search for updates or disable it at this stage?
 
I added Wi-Fi via unattended.xml to install chocolatey + programs via RunOncex. But in OBBE Windows looks for updates and drivers breaking the script it installs. Is there a way to bypass the search for updates or disable it at this stage?
This question is a bit unclear, why does WU running in the OOBE stage interfere with program installs? There is a way to disable WU here, but it's not using the normal method of disabling updates in general because updates in OOBE are handled differently.

Maybe you can explain your install process.
 
Back
Top