(Solved) Potential issues with Unattended and Post-Setup after update

tired-it

Member
Figured it's time to make a thread about this after failing to nail down what issue on my own. Hopefully someone here has some insight to share.

The March update for NTLite brought some neat changes. And since Windows came out with its March updates, I decided to remake an image with the latest updates built-in. The exact same presets for the prior images were used for the new one. The new ISO was completed without issue. Rufus copied it to a flash drive and into a test PC it went.

First couple of attempts, the post-setup script was not executing. Once booted to the desktop, I could manually find and execute the script under "C:\Windows\Setup." I attempted remaking the ISO again. This time the installation would not complete because of an issue with the boot configuration, meaning something went wrong with the unattended file.

I want to reiterate that I am using the exact same presets as before. These presets worked fine before. For added context, my workflow is broken into several steps. Perhaps a bit overkill, but it helps narrow down issues.

1) Fresh Windows ISO. Add latest updates and save a new ISO for use as a base.
2) Remove components. I just remove junk apps like Get Help and Calendar. No system components or anything of the sort.
3) Add drivers.
4) Add settings and registry files that change settings.
5) Post-setup. Couple of MSI files, a few commands and a Wifi profile. Nothing too crazy.
6) Unattended setup and final ISO creation. I have not changed these settings in months and they have worked just fine.. until now apparently.
7) Use Rufus to copy the image onto a flash drive.

And this was all after I was figuring out why NTLite was crashing on the post-setup screen. It turns out some hot-fixes came out shortly after the main March update. Crashes have stopped for now. The program is currently on the latest stable update. Any ideas as to what the issue could be?
 
This is probably related to this problem:
NTLite 9783 Windows could not complete the installation after adding a Package

The reg entry for PostOobe to run SetupComplete might have an error. While I know how to fix the registry on a finished image, the required steps are too impractical to do on a normal basis. I'd wait for a bug fix.

If you want to be persistent:
1. Reload the finished image.
2. Open regedit, look for HKEY_LOCAL_MACHINE\NLTmp~*~SYSTEM (path has a random GUID)

3. Update System\Setup\FirstBoot\PostOobe
Code:
cmd.exe start /MIN /c %WINDIR%\\Setup\\Scripts\\SetupComplete.cmd & exit /b 0

4. Exit regedit. From NTLite, unload this image but Save all changes.
5. Create new ISO.
 
This is probably related to this problem:
NTLite 9783 Windows could not complete the installation after adding a Package

The reg entry for PostOobe to run SetupComplete might have an error. While I know how to fix the registry on a finished image, the required steps are too impractical to do on a normal basis. I'd wait for a bug fix.

If you want to be persistent:
1. Reload the finished image.
2. Open regedit, look for HKEY_LOCAL_MACHINE\NLTmp~*~SYSTEM (path has a random GUID)

3. Update System\Setup\FirstBoot\PostOobe
Code:
cmd.exe start /MIN /c %WINDIR%\\Setup\\Scripts\\SetupComplete.cmd & exit /b 0

4. Exit regedit. From NTLite, unload this image but Save all changes.
5. Create new ISO.
I'm assuming the MachineTasks key within PostOobe is the one that I am updating?
 
Yes. SetupComplete only covers Machine tasks.
Well, if that was supposed to fix the post-setup part of the installation, I was not able to reach it as the unattended error keeps coming back now. No matter how many times I recreate the unattended file, windows keeps stopping the installation with a "cannot update the boot configuration" error. I attached the autounattend that NTLite generated for me.

Is there a way I can generate a log of the installation so I can narrow down the exact error?
 

Attachments

  • autounattend.xml
    6.1 KB
tired-it, thank you, please try the latest version, build 9811.
Don't edit anything manually, reporting an issue is enough.

I haven't replicated this problem, but this latest version is more dynamic regarding the paths thanks to you and garlin for the input.

As for "cannot update the boot configuration", let me know if it remains, that's a Windows problem most probably.
Try wiping the disk (if you don't keep some partitions on it, be careful), make sure to boot UEFI etc.

Let me know how it goes.
 
Btw in your autounattend.xml there is computer name dependent on serial, make sure to use only with NTLite-edited install.wim, cannot distribute this XML on its own.
The boot error did not happen in my test with it, but at the end on last boot there is a Specialize error, IF this XML is used on its own, and Install.wim not prepared for it.

Using a preset and applying, will prepare install.wim properly, just mentioning.
 
Btw in your autounattend.xml there is computer name dependent on serial, make sure to use only with NTLite-edited install.wim, cannot distribute this XML on its own.
The boot error did not happen in my test with it, but at the end on last boot there is a Specialize error, IF this XML is used on its own, and Install.wim not prepared for it.

Using a preset and applying, will prepare install.wim properly, just mentioning.
I appreciate the responses!

NTLite was on build 9783, but it was not notifying me of build 9811. Unfortunately, after manually downloading and installing the 9811 build, I am now unable to integrate Windows updates into a fresh Windows 11 23H2 ISO. When I click on Process, I immediately get an "Aborted" message with no further information. The Process button is also replaced with a Cancel button; however, hovering over it shows Process instead. Is my installation borked?

Here's a snippet from the log file in the temp directory:
Code:
3/18/2024 2:23:25 PM    Windows 11 ProfessionalEducation 23H2 x64 - 10.0.22631.2861
3/18/2024 2:23:26 PM    ICC
3/18/2024 2:23:26 PM    #
3/18/2024 2:23:26 PM    - UnReg (di:0)
3/18/2024 2:23:26 PM    Cleaning
3/18/2024 2:23:26 PM    Waiting for other operations to finish
3/18/2024 2:23:26 PM    Aborted
3/18/2024 2:23:27 PM    SM [po]: clr

And in reference to the autounattend.xml, I only use NTLite to make images. Because of the number of PCs that I am targeting, I found it best to just let Windows generate a basic name based on the serial number. I'll keep in mind to use NTLite generated XML files with NTLite images though. I'm assuming it's because of how the program formats the file?

Also, I am using the default GPT disk template for the autounattend.xml with wipe-disk set to true. That has usually worked just fine for me. In fact, the installation completes all the way to just before rebooting before giving me the "Windows cannot update the boot configuration" error.
 
Last edited:
I appreciate the responses!

NTLite was on build 9783, but it was not notifying me of build 9811. Unfortunately, after manually downloading and installing the 9811 build, I am now unable to integrate Windows updates into a fresh Windows 11 23H2 ISO. When I click on Process, I immediately get an "Aborted" message with no further information. The Process button is also replaced with a Cancel button; however, hovering over it shows Process instead. Is my installation borked?

Here's a snippet from the log file in the temp directory:
Code:
3/18/2024 2:23:25 PM    Windows 11 ProfessionalEducation 23H2 x64 - 10.0.22631.2861
3/18/2024 2:23:26 PM    ICC
3/18/2024 2:23:26 PM    #
3/18/2024 2:23:26 PM    - UnReg (di:0)
3/18/2024 2:23:26 PM    Cleaning
3/18/2024 2:23:26 PM    Waiting for other operations to finish
3/18/2024 2:23:26 PM    Aborted
3/18/2024 2:23:27 PM    SM [po]: clr

And in reference to the autounattend.xml, I only use NTLite to make images. Because of the number of PCs that I am targeting, I found it best to just let Windows generate a basic name based on the serial number. I'll keep in mind to use NTLite generated XML files with NTLite images though. I'm assuming it's because of how the program formats the file?

Also, I am using the default GPT disk template for the autounattend.xml with wipe-disk set to true. That has usually worked just fine for me. In fact, the installation completes all the way to just before rebooting before giving me the "Windows cannot update the boot configuration" error.
Please try the latest build 9812, it has the aborted issue fixed.
What luck to get that 26min lasting version 9811 - apologies for the inconvenience.

If you get any errors, just send me the preset for testing.
 
Please try the latest build 9812, it has the aborted issue fixed.
What luck to get that 26min lasting version 9811 - apologies for the inconvenience.

If you get any errors, just send me the preset for testing.
Such is the nature of coding and programs haha. So I just updated to the newest build, 9815, and this time, when I click on enqueue to add 5 already downloaded updates, the program crashes to desktop with no error message. I was not using a preset this time. I had downloaded the latest updates for Windows 11 23H2 yesterday on the previous build. The "NTLite.log" file in the temp folder just shows the program listing the updates to enqueue before abruptly stopping.

I might be cursed. :eek:
 
Last edited:
Huh, please try 9816+, try not to break it ;)
Was just fixing one Enqueue report, but seems like there was more situations to hit the issue.
Hopefully all are gone now, otherwise I will need exact situation (which updates are downloaded/selected - e.g. a screenshot, and which Windows version, in the status bar catch with the screenshot).

Thank you.
 
Huh, please try 9816+, try not to break it ;)
Was just fixing one Enqueue report, but seems like there was more situations to hit the issue.
Hopefully all are gone now, otherwise I will need exact situation (which updates are downloaded/selected - e.g. a screenshot, and which Windows version, in the status bar catch with the screenshot).

Thank you.
Well, I almost got to update the image this time!error.png

Here's the error information:
Code:
3/19/2024 12:59:32 PM    Reopening image: C:\Program Files\NTLite\Cache\Images\original_w11_23H2_en_x64v2\sources\boot.wim (Microsoft Windows Setup (amd64))
3/19/2024 12:59:32 PM    SM [rm]: clr
3/19/2024 12:59:32 PM    #
3/19/2024 12:59:32 PM    Error - Hive file missing: C:\Users\Admin\AppData\Local\Temp\NLTmpMnt (1)\Windows\System32\config\SYSTEM
3/19/2024 12:59:32 PM    ERROR 2: SYSTEM hive
3/19/2024 12:59:32 PM    Error 2 init reg.
3/19/2024 12:59:32 PM    Error - Hive file missing: C:\Users\Admin\AppData\Local\Temp\NLTmpMnt (1)\Windows\System32\config\SOFTWARE
3/19/2024 12:59:32 PM    Error 2 at loading registry hive: ID1
3/19/2024 12:59:32 PM    Image info 01 error 2, C:\Program Files\NTLite\Cache\Images\original_w11_23H2_en_x64v2\sources\boot.wim
3/19/2024 12:59:32 PM    Error: Detected unsupported Windows version.

This program supports Windows 7, 8.1, 10 and 11 (see Features page online for more info), Retail, Volume and OEM; in a form of images or already deployed (e.g. C:\Windows).
Supports Server editions (excluding component removal and role configuration).
Does not support Checked/Debug and Embedded editions, nor Vista or XP.

If the problem is unexpected and persistent, please check manually for an update at the official website and try again with the newer version, or contact us on email.
3/19/2024 1:00:04 PM    #
3/19/2024 1:00:04 PM    - UnReg (di:0)
3/19/2024 1:00:04 PM    Cleaning
3/19/2024 1:00:04 PM    Waiting for other operations to finish
3/19/2024 1:00:04 PM    Aborted  [1223] The operation was canceled by the user.
3/19/2024 1:00:07 PM    SM [po]: clr
3/19/2024 1:00:07 PM    - UnReg (di:0)
3/19/2024 1:00:07 PM    Load image list
3/19/2024 1:00:07 PM     - Gather image list
3/19/2024 1:00:07 PM    Save tool settings
3/19/2024 1:00:07 PM    Load image list
3/19/2024 1:00:07 PM    GRS
3/19/2024 1:00:07 PM    Image info 02 error 2, C:\Program Files\NTLite\Cache\Images\original_w11_23H2_en_x64v2\sources\boot.wim
3/19/2024 1:00:07 PM    ICC

I checked the boxes for the 5 main updates for 23H2 as well as the Microsoft.UI.Xaml v2.8.6 and Microsoft Visual C++ UWP Runtime v14.00. As usual, I started with a clean, untouched, w11_23H2_en_x64v2 ISO file.
 
That looks like a corrupted image:
original_w11_23H2_en_x64v2\sources\boot.wim

Tested now just in case, and no such issue loading 11 23H2 Pro Education with boot.wim in the sequence.
Maybe something got stuck from earlier tests, or make sure the image is not corrupted.
Open that image with 7-zip and press Test in the toolbar, maybe that is enough of a test if the file itself is corrupted.

Reboot once, just in case.

If the the issue repeats, please upload that boot.wim somewhere for me to test.
Meanwhile you can uncheck it in the process on the Apply page - Reapply, seems like it's used to propagate Registry change.
 
That looks like a corrupted image:
original_w11_23H2_en_x64v2\sources\boot.wim

Tested now just in case, and no such issue loading 11 23H2 Pro Education with boot.wim in the sequence.
Maybe something got stuck from earlier tests, or make sure the image is not corrupted.
Open that image with 7-zip and press Test in the toolbar, maybe that is enough of a test if the file itself is corrupted.

Reboot once, just in case.

If the the issue repeats, please upload that boot.wim somewhere for me to test.
Meanwhile you can uncheck it in the process on the Apply page - Reapply, seems like it's used to propagate Registry change.
I got that error in build 9816; however, it seems that there was stealth update to 9817. So I installed that, deleted my cache and tried again. And huzzah, updates integrated and ISO completed! I suppose the curse may be broken for now. Great work!

Now to test the post-setup and unattended issues that I was encountering before. I'll try to report on that soon.
 
That looks like a corrupted image:
original_w11_23H2_en_x64v2\sources\boot.wim

Tested now just in case, and no such issue loading 11 23H2 Pro Education with boot.wim in the sequence.
Maybe something got stuck from earlier tests, or make sure the image is not corrupted.
Open that image with 7-zip and press Test in the toolbar, maybe that is enough of a test if the file itself is corrupted.

Reboot once, just in case.

If the the issue repeats, please upload that boot.wim somewhere for me to test.
Meanwhile you can uncheck it in the process on the Apply page - Reapply, seems like it's used to propagate Registry change.
Update:

I used the original post-setup and unattended presets for remaking a custom ISO, only this time with the Windows March updates. Installation was successful; no unattended issues were encountered. Even the PC name looks correct after looking at the system Settings page.

Unfortunately, the post-setup process did not initiate at all. When reaching the desktop, I was once again able to find the added files and the "SetupComplete.cmd" script in the "C:\Windows\Setup\" directory. Looking inside the script shows the post-setup commands. I ran the file as admin and watched everything but the "Apply_RunOnce.bat" file complete (not sure why this script did not initiate, but I'm gonna skip over this for now). The CMD prompt disappeared and then deleted the necessary files.

I also want to point out an odd quirk from the NTLite March update. Before, I would add a wifi profile in XML format, which NTLite would place in "C:\Windows\Setup\Files\." Now that file goes into "C:Windows\Setup\" and it does not get deleted once the SetupComplete script finishes. I did confirm that everything else does get deleted.

error.png
Finally, when I click on the destination for the XML file, NTLite crashes with the above error. I only clicked on the destination text to the right of the file. Checking the referenced log file revealed no errors.

Edit: I should mention that I am on NTLite build 9817.
 
Another update!

So the post-setup was not completing. I followed Garlin's advice and checked the registry key at HKEY_LOCAL_MACHINE\NLTmp~*~SYSTEM\Setup\FirstBoot\PostOobe\MachineTasks.

This is what that key had by default:
start /MIN cmd.exe /c %WINDIR%\Setup\Scripts\SetupComplete.cmd&exit /b 0

Below is Garlin's modified version.
cmd.exe start /MIN /c %WINDIR%\\Setup\\Scripts\\SetupComplete.cmd & exit /b 0

I changed the key, saved the image and popped out a new ISO. Installation succeeded as usual. Upon entering the desktop for the first time, I could see that all the post-setup tasks had finally completed in full. Looking in the "C:\Windows\Setup\" folder showed that the script had indeed completed and cleaned up. One exception being the XML file I had mentioned previously. It was saved in the root of the Setup folder rather than in the Files folder. So the XML file was not deleted.
 
Update:

I noticed there was a build 9819 available. Installed that and remade the ISO following all the same steps as before. This time I am able to interact with the destination box of the XML file in Post-Setup without NTLite crashing. Unfortunately, the program still places the XML file in the Setup folder and not the Files folder. Modifying the destination myself does work as intended, though the progam highlights the area as red, as if there's an error.

There were no issues with an unattended installation on a test PC; however, the post-setup process did not initiate. I loaded the completed ISO in NTLite and examined the registry key I had mentioned in previous post. The key's info matched the default. I updated the key to match Garlin's version, saved and re-exported the ISO. Another installation later and I can finally confirm that the registry modification worked as the Post-Setup processes had finally completed without intervention.

For me, that key is consistently the issue with Post-Setup not working during installation.
 
Last edited:
My gut feeling is COMSPEC (your environment variable defining the command interpreter) isn't always "cmd.exe" when this task runs.
By placing the "cmd /c" in front removes any ambiguity. Just my two cents.
 
My gut feeling is COMSPEC (your environment variable defining the command interpreter) isn't always "cmd.exe" when this task runs.
By placing the "cmd /c" in front removes any ambiguity. Just my two cents.
Possibly. I'm not sure if that registry key was affected in any way after NTLite's March update, but so far it is the only thing that works for me after multiple reinstalls.
 
Alright, I take a few things back. While editing a command in the Post-Setup page, NTLite crashed to the desktop. So the Post-Setup page is still cursed.

I confirmed that the registry key is not present until after I add some stuff to the Post-Setup page and save the image. So perhaps NTLite needs a modification in how it adds the key?

Furthermore, there is an odd quirk with changing the location of a copied file. I attempted to modify the XML file's location to "C:\Windows\Setup\Files," but that only ended up making a new folder in a fresh installation at "C:\%SYSTEMROOT%\Setup\Files." I gave up trying to modify the destination so instead I added a command to delete the XML file after it gets added.
 
Back
Top