Cannot get Post-Setup tasks to complete in the same order

Nidorosity

New Member
Messages
1
Reaction score
0
No matter what I do, I cannot get Post-Setup tasks to complete in the order which they are set in NTLite. Is there a file or config I can edit somewhere to ensure these happen in order? It's ruining my day.
 
(Before logon) tasks are written to a batch file, "\sources\$OEM$\$$\Setup\Files\SetupComplete.cmd" on the final ISO.
(After logon) tasks are written to the loaded image's registry as RunOnceEx tasks, ordered as two digit numbers.

Is your problem really about when tasks are completed, and not when they started? Some tasks can run in the background.
Which allows the next task in sequential order to immediately begin, without waiting for the first one.

If a task runs in the background, you need to write a wrapper script which launches it and checks for completion. Since the script doesn't exit until the watched action is done, it blocks execution of the next task in the Post-Setup list.

Here's a quick sanity check: Add these tasks in order.
cmd /c echo 1 >> \path\file.txt​
cmd /c echo 2 >> \path\file.txt​
cmd /c echo 3 >> \path\file.txt​
cmd /c echo 4 >> \path\file.txt​
cmd /c echo 5 >> \path\file.txt​

You should expect file.txt to be "1, 2, 3, 4, 5" when Post-Setup executes.
 
Back
Top