Before getting too cozy with MakePE, you should take the time to look at the Example Scripts that are provided, and create one for your environment.
Let’s look at the Example WinPE 10 ALL.cmd file. All MakePE scripts must start with the following:
@echo off pushd %~dp0 :: Run MakePE.cmd to load the Defaults and MySettings call .\Scripts\MakePE.cmd
This will set the proper path and run MakePE to read the defaults that we set in MakePE: Configure Default Settings. It won’t actually build anything at this point, we actually have to run MakePE.cmd twice.
From there you can add whatever specific settings that are needed, like whether or not you want MakePE to pause at milestones (leave this yes for now) and if you want to Install-Drivers.
A closer look shows that we are going to run MakePE a second time to build WinPE 10 x86 and a third time for WinPE 10 x64 (keeping in mind the first time is always to set the defaults.
A pause at the end allows us to make sure there were no errors in the CMD Window.
Comparing the the Example WinPE 10 All.cmd to Example WinPE 5 x86.cmd will show all that is needed to create two WinPE’s in the same script. This is called chaining.
So whether you need to make one version of WinPE, or one version with two architectures, you can do it all in one CMD Script.
You can even create a CMD Script that removes the Pause, and builds 6 different WinPE Builds (WinPE 3, WinPE 5, and WinPE 10)
But we will get to that in another post. Feel free to review all the Example Scripts and create one for your environment. Any variable set in MySettings.cmd can be changed by using this method.