Skip to content

Instantly share code, notes, and snippets.

@wesinator
Last active November 29, 2017 15:07
Show Gist options
  • Save wesinator/4ca90e85dea76c52a20024a13328dab2 to your computer and use it in GitHub Desktop.
Save wesinator/4ca90e85dea76c52a20024a13328dab2 to your computer and use it in GitHub Desktop.
Create a WinPE flat boot Virtual Hard Disk
:: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-install-on-a-hard-drive--flat-boot-or-non-ram
:: For Windows 8 and 8.1 series ADKs. May not work for earlier Windows PE AIKs.
:: Using C:\WinPE\ build dir.
copype.cmd x86 C:\WinPE\x86 :: to create x86 Windows PE media in x86 folder. (AMD64 is also available, but lacks WoW64 layer and will be less compatible with applications).
:: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/diskpart-scripts-and-examples
diskpart /s create_winpe_vhd.diskpart
dism /Apply-Image /ImageFile:"C:\WinPE\x86\media\sources\boot.wim" /Index:1 /ApplyDir:V:\
BCDboot V:\Windows /s V: /f ALL
create vdisk file="C:\WinPE\WinPE_flatboot.vhd" maximum=2000
attach vdisk
clean
create partition primary
format quick fs=fat32 label="WinPE"
assign letter=V
active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment