![]() Ok, let’s get to building WinPE! Building Custom WinPEīuilding the custom WinPE will involve several steps. ![]() The good news is that we can add things to startnet.cmd and this is exactly what we’ll do to load our primary PowerShell script.įor further reading on the topic of how WinPE startup works, I’d recommend checking out this blog and this blog. This initializes WinPE (networking, storage, etc) and then will exit to the cmd window. Startnet.cmd is located in the System32 folder as well and only has one line: wpeinit.exe If neither setup.exe nor winpeshl.ini exist, then Winpeshl.exe will run “cmd.exe /k startnet.cmd”. You can read more about what is supported here. WinPE is somewhat limited in what settings can be run via unattend.xml. You can see an example from my Wifi for MDT blog: You can also use this unattend.xml to call scripts or executables or set the screen resolution. Additionally, it will also look for and automatically process an unattend.xml file in that same location. This file needs to be saved under the “Windows\System32” folder in the place where you mount WinPE (more on that in the next section). Running apps in this manner will bypass the command prompt and immediately launch them. %SYSTEMDRIVE%\Fabrikam\app2.exe, /s "C:\Program Files\App3" It looks something like this (from MS docs) and is used to call one or more applications: ĪppPath = %SYSTEMDRIVE%\Fabrikam\shell.exe This file is also not there by default and must be created. So if Winpeshl.exe does not find setup.exe, it will move on and look for a file called “winpeshl.ini” and if found will process what’s inside. Setup.exe is not there by default when you use WinPE from the Windows ADK kit. It will load the familiar Windows Setup screen: This process looks for “%systemdrive%\sources\setup.exe” and will launch it if found. When WinPE first loads it calls the process WinLogon.exe which in turn calls Winpeshl.exe. You might be asking why even bother with going the WinPE route vs just using the standard Windows Setup with autounattend.xml as I detailed in my other blog? First, let’s go into a little background on how WinPE or Windows Setup (setup.exe) behave on first launch. Custom WinPE vs Setup.exe – Why go custom? Invoke-WebRequest "" -OutFile "$downloads\"Įxpand "$downloads\" -F:* "$dir\WinPE10.0-Drivers"įor this guide, I will be doing everything with Windows 11, but the process will work just the same with Windows 10. Start-process -FilePath "$downloads\adkwinpesetup.exe" -ArgumentList "/quiet /features OptionId.WindowsPreinstallationEnvironment" -Wait Invoke-WebRequest "" -OutFile "$downloads\adkwinpesetup.exe" #Download and Install Win11 WinPE ADK (Backwards compatible with win10) Start-process -FilePath "$downloads\adksetup.exe" -ArgumentList "/quiet /features OptionId.DeploymentTools" -Wait Invoke-WebRequest "" -OutFile "$downloads\adksetup.exe" #Download and Install Win11 ADK (Backwards compatible with win10) Here is a handy script I wrote to help you with steps 1-3. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |