I'm using an unattended installation of Windows 10 21H2 LTSC using an "answer file" (unattend.xml) on a surface pro 7 plus device.
I have placed SetupComplete.cmd at: %windir%\setup\scripts as suggested from the documentation in the image file (WIM file). I can see the file is in place after Windows installation is done.
Following the installation on the tablet I see that the commands in SetupComplete.cmd were not executed. There is nothing in the log file where SetupComplete.cmd should write to.
Is there something else to do so this file (SetupComplete.cmd) will run? Registry? answer-file?
Any suggestions?
As it seems my issue is related to the following KB:
https://learn.microsoft.com/en-us/troubleshoot/mem/configmgr/os-deployment-task-sequence-not-continue
In my case I was using Windows® 10 IoT Enterprise 2021 LTSC but Setup could not detect that it was an Enterprise edition so did not run the script:
This explains why Setup did has decided not to run
SetupComplete.cmd- a poor decision since it was an "Enterprise" edition after all. This seems like a bug in Windows Setup. Still waiting for a resolution from MSFT.