NTLite clobbering its own SetupComplete.cmd?

jailbird

New Member
I'm running registered NTLite 1.8.0.6650 64-bit working on a LTSC 2019 image.

Right after NTLite processes the Post-Setup part, the SetupComplete.cmd file looks correct:

Code:
@echo off
powercfg /hibernate off
net accounts /maxpwage:unlimited
msiexec /i "%WINDIR%\Setup\Files\OpenShellSetup64_4_4_132.msi" /passive
msiexec /i "%WINDIR%\Setup\Files\7z1805-x64.msi" /passive
"%WINDIR%\Setup\Files\SumatraPDF-3.1.2-64-install.exe" /s
rd /q /s "%WINDIR%\Setup\Files"
del /q /f "%0"

However, when NTLite is completely done, the file looks stripped down:

Code:
@echo off
del /q /f "%0"

This doesn't look right to me, is this normal?
 
Thats not right, tool has overwritten the original. Previous tool build number created the 2nd one you posted even when i did not add anything Post Install. Hang tight. Once i have a working answer file and setupcomplete.cmd i back them up and edit them if needed and manually add them later on.
 
Last edited:
Awesome, thanks. At least I know I'm not crazier than what I thought!

So I worked around it by copying the good one out from underneath it, and then once it finished, copying it back over the bad one. Seems to work swimmingly then!
 
This is what a basic one should look like if you just disabled hibernation and added a reg file. I always keep known working answer etc and copy them into the source, why redo them everytime and you can just edit the existing one? You can always create an iso later once you have copied setupcomplete and various $OEM$ folders, Source page, select the dessired image, make iso, it doesnt have to be loaded.

@echo off
powercfg /hibernate off
regedit /S "%WINDIR%\Setup\Files\tweaks.reg"
rd /q /s "%WINDIR%\Setup\Files"
del /q /f "%0"
 
Last edited:
I have a setupcomplete.cmd with 30 lines and NTLite made changes before 6650 build,seems like that minor issue has been fixed.

Sometimes setupcomplete.cmd is read by NTLite and appear to be changed, itis recorded in the auto-saved preset but there are no visual changes, no issues.

Would be good to know if any of your commands triggers that change.

I have 2 more cmd files that runs earlier at different times:
"first hd boot.cmd" file
oobe.cmd
setupcomplete.cmd

Every routine prints to a file the date and time on start and finish, oobe starts over 33 seconds after the first hd boot has finished and setupcomplete.cmd starts 13 after oobe has finished. The times depends on the hardware and the kept components.
 
Kas, is there a clear guide as to what each of those files can do and the correct order they are executed?
I don't really know (documented) really but it has been most trial and error but can run scripts/programs (silent) supported at the time when it is run (some are services dependant).

The "first hd boot.cmd" file is run by the autounattend.xml as there also could be run firstlogon commands, programs or scripts that run after setupcomplete.cmd (you can add users here but can't add to administrators group).
OOBE.cmd is run automatically by the setup but the commands inside depends on the system to run (you can add users here but can't add to administrators group).
SetupComplete.cmd should be run automatically by the setup, i think it is disabled in Win 10 by removing component(s), i'm not sure as i haven't reach to test in Win 10 (you can add users here, add to administrators group and remove from the users group).

Also i run some lines to read some info with wmic from BIOS and set to the OS starting from OOBE.cmd
 
Last edited:
I just started using autounattended.xml for hiding IE & WMP (not disabled nor removed), add some IE tweaks and pin programs to the taskbar and the first cmd scriptis used to relocate shortcuts as i don't want them as Ms wanted.

Running cmd scripts in unattended.xml (at least in firsthd boot) is component dependant (and was a headache to succed) but still i'm going to pinpoint it.
 
I'm running registered NTLite 1.8.0.6650 64-bit working on a LTSC 2019 image.

Right after NTLite processes the Post-Setup part, the SetupComplete.cmd file looks correct:

However, when NTLite is completely done, the file looks stripped down:
Hi jailbird,

I cannot replicate this, do you have a preset which produces the stripped down setupcomplete?
Btw make sure your preset is not the one removing lines, for example if you remove those lines and save that preset, then each time that preset is loaded it will seek and remove those lines if existing.
And are you checking the setupcomplete inside or outside of the WIM ($OEM$ folder)?

Thanks.
 
if you put your setupcomplete to setup folder and apply your preset after that. ntlite will recognise your setupcomplete file and mess with it.

if you don't want ntlite to touch your original file. first apply the preset, then put your setupcomplete to setup folder.
 
I keep a template source dvd folder with answer file Sources/$OEM$/required files and just copy/merge contents as needed.
 
Hi jailbird,

I cannot replicate this, do you have a preset which produces the stripped down setupcomplete?
Btw make sure your preset is not the one removing lines, for example if you remove those lines and save that preset, then each time that preset is loaded it will seek and remove those lines if existing.
And are you checking the setupcomplete inside or outside of the WIM ($OEM$ folder)?

Thanks.

I'm checking the one outside of the .WIM (the one inside the $OEM$ folder), maybe that's why? I didn't even think to check inside the .WIN.

I have it happen even when not loading any preset at all. I'll try and narrow it down to a better test case.

Thanks for the reply!
 
Ive been using it more lately(thanks to Kasual) to add wallpapers and themes and other things i want, adding portable programs this way is a time saver.
 
Back
Top