I am working on my first custom ISO with NTLite. Using Windows 11 LTSE IoT 2024 as the basis.
I have added some logging to the SetupComplete.cmd that NTLite creates as follows:
The files LGPO.exe regpol_machine.txt and regpol_user.txt are in the sources\$OEM$\$$\Setup\Scripts folder on the ISO.
After installation and logging in with the admin account, it seems that LGPO.exe did not run. The .pol files are not created. SetupComplete.log only has the output from the netsh commands, nothing from LGPO.exe.
If I run SetupComplete.cmd from an elevated command prompt of the admin user after login, it works as expected.
Using NTLite version 2025.12.10723 with home license.
What am I doing wrong?
I have added some logging to the SetupComplete.cmd that NTLite creates as follows:
Code:
CD "%TEMP%"&CLS&@TITLE Post-Setup tasks
set logfile=SetupComplete.log
:: Load policy
%~dp0LGPO.exe /r %~dp0regpol_machine.txt /w "%SystemRoot%\System32\GroupPolicy\Machine\Registry.pol" /v 2>&1 >>%logfile%
%~dp0LGPO.exe /r %~dp0regpol_user.txt /w "%SystemRoot%\System32\GroupPolicy\User\Registry.pol" /v 2>&1 >>%logfile%
:: Turn sharing and network discovery on
netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes 2>&1 >>%logfile%
netsh advfirewall firewall set rule group="Network Discovery" new enable=Yes 2>&1 >>%logfile%
:: del /q /f "%WINDIR%\Setup\Scripts\NTLCompName.vbs"
:: del /q /f "%0"
The files LGPO.exe regpol_machine.txt and regpol_user.txt are in the sources\$OEM$\$$\Setup\Scripts folder on the ISO.
After installation and logging in with the admin account, it seems that LGPO.exe did not run. The .pol files are not created. SetupComplete.log only has the output from the netsh commands, nothing from LGPO.exe.
If I run SetupComplete.cmd from an elevated command prompt of the admin user after login, it works as expected.
Using NTLite version 2025.12.10723 with home license.
What am I doing wrong?