Perform PE stage of Windows Setup via custom .cmd script #259
Replies: 6 comments 10 replies
-
|
This is how the PE stage would look like running such a script: |
Beta Was this translation helpful? Give feedback.
-
|
Could this be utilized to run winntsetup? I'm not sure the benefit here, but it could allow some manipulation in this space. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
I have just added the option to generate the PE.cmd script, controlled by several other settings in the form including partition layout, compact mode and image selection:
|
Beta Was this translation helpful? Give feedback.
-
|
in the autounattend.xml file. You are correct that X:\assert.vbs was initially not used in conjunction with X:\pe.cmd, but I changed this behavior recently. |
Beta Was this translation helpful? Give feedback.
-
|
In version 25H2 I'm getting error for this line in custom script: |
Beta Was this translation helpful? Give feedback.



Uh oh!
There was an error while loading. Please reload this page.
-
37887a0 adds the option to provide a .cmd script to handle the PE stage of Windows Setup:
Such a .cmd script will typically need to
C:\Windows\Panther\unattend.xmlandC:\Windows\Panther\unattend-original.xmlso that the unattended setup process will continue after the reboot,wpeutil.exe reboot) to conclude the PE stage.This has some notable benefits, mainly because custom code can run after the imaging operation is complete:
You can remove and disable 8.3 file names without manual interaction.
Disabling Windows Defender is much easier, compared to the awkward DisableDefender.vbs script.
You can avoid the creation of a recovery partition in Windows 11 24H2 by deleting the file
C:\Windows\System32\Recovery\winre.wim.You can fine-tune the imaging operation. For example, you can add the
/Compactswitch to thedism.exe /Apply-Imagecall.Beta Was this translation helpful? Give feedback.
All reactions