I am stuck with how WinBuilder orders .script files in the project tree.
Do anyone knows exact ordering algorithm of WinBuilder?
At first glance, I thought WinBuilder is using ascii ordering while ignoring case.
In contrast, Windows Explorer uses natural ordering which is more human-friendly.
cmd (ASCII) | explorer (Natural) |
0 - X.script | 00 - X.script |
00 - X.script | 0 - X.script |
1 - X.script | 1 - X.script |
10 - X.script | 2 - X.script |
2 - X.script | 10 - X.script |
But the problem rises from here. Sometimes WB uses ascii ordering, and sometimes not.
- Case 1 : WB uses natural orderingSee the reversed order of
Retrieve Tools and
0 - Preconfig (from Win10PESE).

These two scripts are ordered differently in the world of ascii/natural order.
cmd (ASCII) | explorer (Natural) |
0 - preconfig.script | 00 - retrieve.script |
00 - retrieve.script | 0 - preconfig.script |
- Case 2 : WB uses ascii orderingWhen I tested with numbers, WB sticks to ascii order.
Explorer
WinBuilder
PEBakery
Now I am guessing that WinBuilder uses natural ordering
only if some conditions are met, which I am unable to figure out.
Is this a bug of WB? Or caused by locale difference?
This issue is affecting build of the Win10PESE, so any help is appreciated.