Skip to content

This is a practical with auto formating OS with partition C:

Notifications You must be signed in to change notification settings

yutsunoki/Autolaod_for_WinPE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Autolaod_for_WinPE


Introduction

This is my practical about the WinPE.
We should format the OS with automatically and officially by using WinPE.
Here is the script startnet.cmd.

Table of contants.


Guide

To create a WinPE

Create a WinPE with Windows ADK.
Run Deployment and Imaging Tools Environment and execute this command.

copype amd64 \winpe\winpe_c
cd \winpe

Then we should mount the WinPE image to the "mount" file.
You can copy the build command from Autolaod_for_WinPE/build to "\winpe".

imagex /mountrw \winpe\winpe_c\media\sources\boot.wim 1 \winpe\mount

Copy the findstr.exe to the WinPE.

copy \Windows\System32\findstr.exe \winpe\mount\Windows\system32\

Here is the drivers and packages install for the WinPE. These drivers and packages can be found from "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs"1.

dism /image:\winpe\winpe_c\mount /add-package /packegepath:WinPE-DismCmdlets.cab
dism /image:\winpe\winpe_c\mount /add-package /packegepath:WinPE-EnhancedStorage.cab
dism /image:\winpe\winpe_c\mount /add-package /packegepath:WinPE-Fonts-Legacy.cab
dism /image:\winpe\winpe_c\mount /add-package /packegepath:WinPE-LegacySetup.cab
dism /image:\winpe\winpe_c\mount /add-package /packegepath:WinPE-PowerShell.cab
dism /image:\winpe\winpe_c\mount /add-package /packegepath:WinPE-Scripting.cab
dism /image:\winpe\winpe_c\mount /add-package /packegepath:WinPE-SecureBootCmdlets.cab
dism /image:\winpe\winpe_c\mount /add-package /packegepath:WinPE-SecureStartup.cab
dism /image:\winpe\winpe_c\mount /add-package /packegepath:WinPE-Setup.cab
dism /image:\winpe\winpe_c\mount /add-package /packegepath:WinPE-StorageWMI.cab
dism /image:\winpe\winpe_c\mount /add-package /packegepath:WinPE-WDS-Tools.cab
dism /image:\winpe\winpe_c\mount /add-package /packegepath:WinPE-WinReCfg.cab
dism /image:\winpe\winpe_c\mount /add-package /packegepath:WinPE-WMI.cab

After, we can copy the startnet.cmd from Autolaod_for_WinPE/src to the "\winpe\winpe_c\media\Windows\System32".

copy startnet.cmd \winpe\winpe_c\media\Windows\System32\

Then, we can umount and commit for the "mount" file.

imagex /unmount /commit \winpe\winpe_c\mount
imagex /cleanup

Next, we gotta build iso with oscdimg command2.

oscdimg -bootdata:2#p0,e,bwinpe_c\fwfiles\etfsboot.com#pEF,e,bwinpe_c\fwfiles\efisys.bin -u1 -udfver102 winpe_c\media winpe_f.iso

Install to the USB

After, the iso file builded, we should mount that iso file and switch to the iso drive. Then we'll copy all the folders and files to the "WINPE_F" of the USB partition.

The USB partition and format should be like this!!! 🔻
disk

Here are the inside of "USBdata" partition. 🔻
map

Where to find install.wim file

The install.wim file3 that can be found from original ISO file "sources\install.wim"3.
Also, can use the capture command4 from Autolaod_for_WinPE/build to build your own install.wim.

❗ IMPORTANT

If you want to capture your current OS please ensure that they is perform from another OS environment, such as WinPE. By the way, before that please remove the startnet.cmd first from the WinPE.

dism /capture-image /imagefile:install.wim /capturedir:e:\ /scratchdir:scratch /name:win10_c /checkintegrity /verify /bootable /compress:maximum

Footnotes

  1. Here is the official manual of WinPE option component. Also can refer to HaroldMitts/Build-CustomPE.

  2. Please refer to "Oscdimg Command-Line Options".

  3. For the install.wim defination please refer to "Windows Image Files and Catalog Files Overview". About the ESD file please refer to "how to extract install.esd to install.wim" 2

  4. How to build own install.wim please refer to "Capture and apply a Windows image"

About

This is a practical with auto formating OS with partition C:

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published