Wpeinit.exe
We now know that wpeinit is called by the Startnet. But what does this executable actually do?
About Wpeinit
Microsoft learn has a very simple page dedicated to Wpeinit. What it does tell us is that Wpeinit outputs log messages to "C:\Windows\system32\wpeinit.log", but that is incorrect when booted to WinPE, we actually need to look in the SystemDrive, which is X:\
We can easily open this file in notepad.exe and get an understanding of what Wpeinit does

In simple terms, Wpeinit is used to start the WinPE environment, optionally loading settings found in X:\Unattend.xml. In absence of an Unattend.xml, default settings are used.
Display Settings
Unattend.xml: Microsoft-Windows-Setup/Display
On UEFI-based computers, this setting is ignored unless you have added a graphics driver into the Windows PE image at \sources\boot.wim. On BIOS-based computers, by default, Windows PE uses a resolution of 1024x768. For displays with a smaller maximum resolution, Windows PE uses the largest resolution available, based on the extended display identification data (EDID) of the connected display.
Virtual Memory Paging File
Unattend.xml: Microsoft-Windows-Setup/PageFile
Specifies the location and the size of the Windows PE operating system page file to create. This setting applies only to the Windows PE page file, and not to the page file of the Windows installation.
Network Access and Applying Configuration
Unattend.xml: Microsoft-Windows-Setup/EnableNetwork
Specifies whether network connection is enabled.
Firewall Settings
Unattend.xml: Microsoft-Windows-Setup/EnableFirewall
Specifies whether Windows Firewall is enabled for Windows Preinstallation Environment (Windows PE). This setting does not apply to the Windows Firewall settings of the Windows installation.
Synchronous User-Provided Commands
Unattend.xml: Microsoft-Windows-Setup/RunSynchronous
Specifies one or more commands to run during the windowsPE configuration pass.
Synchronous commands start in the order that you specify in the unattended installation answer file, and each command must finish before the next command starts.
To start a command that needs to finish before other commands can start, use synchronous commands. To run services or commands that can start at the same time, use RunAsynchronous instead. RunSynchronous commands always run before RunAsynchronous commands in the same pass.
Asynchronous User-Provided Commands
Unattend.xml: Microsoft-Windows-Setup/RunAsynchronous
Specifies one or more commands to run during the windowsPE configuration pass.
To run services or commands that can start at the same time, use asynchronous commands. To run commands that need to finish before other commands can start, use RunSynchronous instead.
Shutdown Settings
Unattend.xml: Microsoft-Windows-Setup/Restart
Specifies whether to restart or to shut down the computer after the windowsPE configuration pass. This setting is specific to Windows PE scenarios. Once image-based installation begins, this setting is ignored.
Last updated
