This document outlines the preparation of a bootable WinPE drive that can be used for rescue and recovery on UEFI devices that can’t be easily accessed via live linux CD.
WinPE is a lightweight windows OS intended for configuration or recovery. It is basically the equivalent of booting into Safe Mode with Command Prompt, or booting Windows Recovery Media and choosing the Command Line option.
Sometimes when you’re trying to recover data from un-bootable machne you just want to boot directly into command line, instead of going through WinRe options. Additionally, you can inject extra software (such as your own batch scripts, a file manager and etc) into the media at the build stage, which could make it more powerfule than WinRE drive.
Before you start:
To create WinPE media follow these steps:
copype amd64 C:\winpe
This will create the c:\winpe
folder and copy all the necessary files there.
This step is optional, and you can skip it, if you don’t want to add any 3rd party programs to the WinPE image. In our case we will be adding the Explorer++ file manager to our environment, since WinPE lacks a GUI file manager.
mkdir c:\mount
boot.wim
file in the working directory:
dism /mount-wim /wimfile:"c:\winpe\media\sources\boot.wim" /index:1 /mountdir:c:\mount
system32
folder if you want them included in the path):
cp explorer++.exe c:\mount\Windows\system32\explorer.exe
dism /unmount-wim /mountdir:c:\winpe /Commit
Now the image is ready.
e:
)MakeWinPEMedia /UFD C:\winpe E:
You now have a usb drive that will boot into your customized WinPE environment.