Jul 16 2022 08:24 PM
1.) Download the Windows 11 ISO Image (64-bit) and place in the following folder: C:\ISO
Download Windows 11 Disk Image (ISO) -> Select Download -> Windows 11 (multi-edition ISO) -> Download
Select the product language -> English (United States) -> Confirm
Windows 11 English -> 64-bit Download
NOTE: When Downloading the ISO Images on Windows 10 / 11, you must use a User-Agent Switching Addon, like in the examples below:
User-Agent Switcher and Manager: https://chrome.google.com/webstore/detail/user-agent-switcher-and-m/bhchdcejhohfmigjafbampogmaanbfkg
(Firefox: https://addons.mozilla.org/en-US/firefox/addon/user-agent-string-switcher/ )
2.) Download the following Zip file ( Sysinternals Suite ) to the Desktop folder -> %UserProfile%\Desktop\SysinternalsSuite.zip
NOTE: WinPE 10 2004 and 11 21H2 are the last versions which support x86 / 32-bit environments ( 10_2004 unpatched supports ReFS 3.4, 11_21H2 unpatched supports ReFS version 3.7, 11_22H2 supports ReFS 3.9+, which is only important information if you want to create ReFS partitions with WinPE that you can mount on Windows 10 / 11. This allows you to create a VHD / VHDX file almost instantaneously. )
NOTE: Currently most ReFS tools on Windows 10 / 11 do not support anything beyond revision 3.5, although you can mount up to revision 3.7 it seems (version 3.9 currently shows as a RAW Image on 21H2 )
Resilient File System (ReFS) overview - Additional References -> https://docs.microsoft.com/en-us/windows-server/storage/refs/refs-overview#additional-references
Resilient File System (ReFS) overview - Additional References -> ReFS versions and compatibility matrix -> https://gist.github.com/0xbadfca11/da0598e47dd643d933dc
3.) NOTE: The following requires both WinRAR and the WinPE add-on for the ADK to be installed
4.) %UserProfile%\Desktop\Win64\WinPE\Initial_W11.bat -> Extract the ISO Image(s) / Archives:
@ECHO OFF
DISM /Cleanup-Mountpoints
MOUNTVOL /R
RMDIR /S /Q "C:\SysinternalsSuite"
RMDIR /S /Q "C:\Win11_English_x64v1"
RMDIR /S /Q "C:\Scratch_Win"
RMDIR /S /Q "C:\Mount"
MKDIR "C:\SysinternalsSuite"
MKDIR "C:\Win11_English_x64v1"
"%ProgramFiles%\WinRAR\WinRAR.exe" x -ibck -y "%UserProfile%\Desktop\SysinternalsSuite.zip" -r "C:\SysinternalsSuite"
"%ProgramFiles%\WinRAR\WinRAR.exe" x -ibck -y "C:\ISO\Win11_English_x64v1.iso" -r "C:\Win11_English_x64v1"
MOVE NUL 2>&0
5.) Example: configure the "Balanced" power profile and export it:
Start Powershell -> Start Menu -> Run -> taskmgr -> File -> Run new Task -> %SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe -> Select "Create this task with administrative privileges." -> Click OK.
MKDIR "%UserProfile%\Desktop\Win64\WinPE\Power_Settings"
POWERCFG /EXPORT "%UserProfile%\Desktop\Win64\WinPE\Power_Settings\W10_11.pow" 381b4222-f694-41f0-9685-ff5bb260df2e
POWERCFG /EXPORT "%UserProfile%\Desktop\Win64\WinPE\WinPE.pow" 381b4222-f694-41f0-9685-ff5bb260df2e
6.) Place ( Startnet.cmd ) in the following folder: %UserProfile%\Desktop\Win64\WinPE
@ECHO OFF
SETLOCAL
POWERCFG /SETACTIVE a1841308-3541-4fab-bc81-f71556f20b4a
POWERCFG /DELETE 381b4222-f694-41f0-9685-ff5bb260df2e
POWERCFG /IMPORT WinPE.pow 381b4222-f694-41f0-9685-ff5bb260df2e
POWERCFG /SETACTIVE 381b4222-f694-41f0-9685-ff5bb260df2e
7.) Place ( Profile_Power_Setup.bat ) in the following folder: %UserProfile%\Desktop\Win64\WinPE\Power_Settings
@ECHO OFF
SETLOCAL
POWERCFG /SETACTIVE a1841308-3541-4fab-bc81-f71556f20b4a
POWERCFG /DELETE 381b4222-f694-41f0-9685-ff5bb260df2e
POWERCFG /IMPORT "C:\Power_Settings\W10_11.pow" 381b4222-f694-41f0-9685-ff5bb260df2e
POWERCFG /SETACTIVE 381b4222-f694-41f0-9685-ff5bb260df2e
RMDIR /S /Q "C:\Power_Settings"
DEL /Q "%AllUsersProfile%\Microsoft\Windows\Start Menu\Programs\StartUp\Profile_Power_Setup.bat"
8A.) Download the latest Cumulative Updates for Windows 11 and the .NET Framework:
Windows 11 update history -> https://support.microsoft.com/en-us/topic/windows-11-update-history-a19cd327-b57f-44b9-84e0-26ced7109ba9
History of Cumulative Updates for .NET Framework for Windows 11 -> https://support.microsoft.com/en-us/topic/history-of-cumulative-updates-for-net-framework-for-windows-11-b56e9c5b-fc56-49fb-9490-dc09b0b89758
8B.) Example: For KB5015814 and KB5013889 modify these links for near exact search results:
https://www.catalog.update.microsoft.com/Search.aspx?q= <Insert_KB_Patch_Number_Here> 11
https://www.catalog.update.microsoft.com/Search.aspx?q= <Insert_KB_Patch_Number_Here> 11 -"GDR-DU"
https://www.catalog.update.microsoft.com/Search.aspx?q= <Insert_KB_Patch_Number_Here> 11 -"GDR-DU" -"Dynamic"
https://www.catalog.update.microsoft.com/Search.aspx?q= <Insert_KB_Patch_Number_Here> 11 -"GDR-DU" -"Dynamic" -"Preview" -"ARM64"
8C.) Example: Download the following files and place them in this folder: "C:\Patches\MS\Win11\21H2\x64"
2022-07 Cumulative Update for Windows 11 for x64-based Systems (KB5015814)
https://www.catalog.update.microsoft.com/Search.aspx?q=KB5015814 11 -"GDR-DU" -"Dynamic" -"Preview" -"ARM64"
2022-06 Cumulative Update for .NET Framework 3.5 and 4.8 for Windows 11 for x64 (KB5013889)
https://www.catalog.update.microsoft.com/Search.aspx?q=KB5013889 11 -"GDR-DU" -"Dynamic" -"Preview" -"ARM64"
9.) Read the comments first, and then run the WinPE Image Creation Script / Batch File ( Save As: %UserProfile%\Desktop\Win64\WinPE\WinPE11_x64_PowerShell.bat )
@ECHO OFF
SETLOCAL
REM NOTE: This could ONLY work when the ADK with the WinPE addon is ALREADY installed, and this batch file is run from the environment itself.
REM NOTE: Some of the syntax / arguments have to be changed, such as the path for the USB Drive (if this is going to work properly.)
REM NOTE: These 3 lines below show how to INSTALL the ADK and WinPE Addon first ->
REM "Download the Windows ADK for Windows 11" -> https://docs.microsoft.com/en-us/windows-hardware/get-started/adk-install#download-the-adk-for-windows-11
REM "Download the Windows ADK" -> https://go.microsoft.com/fwlink/?linkid=2165884
REM "Download the Windows PE add-on for the ADK" -> https://go.microsoft.com/fwlink/?linkid=2166133
REM https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-add-packages--optional-components-reference?view=windows-10
REM https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-create-usb-bootable-drive#create-a-bootable-winpe-usb-drive
REM https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-adding-powershell-support-to-windows-pe
REM https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-mount-and-customize
REM https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-optimize
REM NOTE: Run this first from the "Deployment and Imaging Tools Environment" Command Prompt: copype AMD64 "C:\WinPE_AMD64_PS"
REM ----------------------------------------------------------------------------------------------------
DISM /Mount-Image /ImageFile:"C:\WinPE_AMD64_PS\media\sources\boot.wim" /Index:1 /MountDir:"C:\WinPE_AMD64_PS\mount"
REM NOTE: "By default, this is 512MB for PCs with more than 1GB of RAM, otherwise the default is 32MB. Valid values are 32, 64, 128, 256, or 512."
DISM /Set-ScratchSpace:512 /Image:"C:\WinPE_AMD64_PS\mount"
MKDIR "C:\ScratchDir"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\lp.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-Fonts-Legacy.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-FontSupport-WinRE.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-FontSupport-JA-JP.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-FontSupport-KO-KR.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-FontSupport-ZH-CN.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-FontSupport-ZH-HK.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-FontSupport-ZH-TW.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-WMI.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-WMI_en-us.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-NetFx.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-NetFx_en-us.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-Scripting.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-Scripting_en-us.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-PowerShell.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-PowerShell_en-us.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-StorageWMI.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-StorageWMI_en-us.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-DismCmdlets.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-DismCmdlets_en-us.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-SecureBootCmdlets.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-SecureStartup.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-SecureStartup_en-us.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-PlatformId.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-WinReCfg.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-WinReCfg_en-us.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-PPPoE.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-PPPoE_en-us.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-RNDIS.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-RNDIS_en-us.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-HTA.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-HTA_en-us.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-Dot3Svc.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-Dot3Svc_en-us.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-EnhancedStorage.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-EnhancedStorage_en-us.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-FMAPI.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-PmemCmdlets.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-PmemCmdlets_en-us.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-WDS-Tools.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-WDS-Tools_en-us.cab"
REM DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-Setup.cab"
REM DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-Setup_en-us.cab"
REM DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-Setup-Client.cab"
REM DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-Setup-Client_en-us.cab"
REM DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-Setup-Server.cab"
REM DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-Setup-Server_en-us.cab"
REM DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-LegacySetup.cab"
REM DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-LegacySetup_en-us.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-MDAC.cab"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-MDAC_en-us.cab"
DISM /Cleanup-Image /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /StartComponentCleanup /ResetBase
REM NOTE: The following requires: "Sysinternals Suite" -> https://docs.microsoft.com/en-us/sysinternals/downloads/sysinternals-suite
COPY "C:\SysinternalsSuite\Sdelete64.exe" "C:\WinPE_AMD64_PS\mount\windows\system32"
COPY "%UserProfile%\Desktop\Win64\WinPE\Startnet.cmd" "C:\WinPE_AMD64_PS\mount\windows\system32"
COPY "%UserProfile%\Desktop\Win64\WinPE\WinPE.pow" "C:\WinPE_AMD64_PS\mount\windows\system32"
DISM /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /Optimize-Image /Boot
DISM /Unmount-Image /MountDir:"C:\WinPE_AMD64_PS\mount" /Commit
DISM /Cleanup-Mountpoints
RMDIR /S /Q "C:\ScratchDir"
DISM /Export-Image /SourceImageFile:"C:\WinPE_AMD64_PS\media\sources\boot.wim" /SourceIndex:1 /DestinationImageFile:"C:\WinPE_AMD64_PS\mount\boot2.wim"
DEL "C:\WinPE_AMD64_PS\media\sources\boot.wim"
COPY "C:\WinPE_AMD64_PS\mount\boot2.wim" "C:\WinPE_AMD64_PS\media\sources\boot.wim"
DEL "C:\WinPE_AMD64_PS\mount\boot2.wim"
MOVE NUL 2>&0
10.) %UserProfile%\Desktop\Win64\WinPE\WinPE11_x64_PowerShell_Patch.bat -> Apply the patches ( If virtual memory is disabled, you will have to run this several times in an entirely separate Command Prompt )
@ECHO OFF
DISM /Mount-Image /ImageFile:"C:\WinPE_AMD64_PS\media\sources\boot.wim" /Index:1 /MountDir:"C:\WinPE_AMD64_PS\mount"
MKDIR "C:\ScratchDir"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Patches\MS\Win11\21H2\x64\windows10.0-kb5015814-x64_db4c15264fec1ac8a6794a442a00fe7881337cd3.msu"
DISM /Add-Package /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Patches\MS\Win11\21H2\x64\windows10.0-kb5013889-x64-ndp48_852faa94119365c2d2a311a59536bb9b85a5f653.msu"
DISM /Cleanup-Image /Image:"C:\WinPE_AMD64_PS\mount" /ScratchDir:"C:\ScratchDir" /StartComponentCleanup /ResetBase
DISM /Unmount-Image /MountDir:"C:\WinPE_AMD64_PS\mount" /Commit
RMDIR /S /Q "C:\ScratchDir"
MOVE NUL 2>&0
11.) Create the WinPE ISO Image:
REM Example for 64-bit Host, 64-bit Guest:
C:\PROGRA~2\WI3CF2~1\10\ASSESS~1\DEPLOY~1\amd64\Oscdimg\oscdimg.exe -m -o -u1 -udfver102 -lWIN_PE_X64 -bootdata:2#p0,e,b"C:\WinPE_AMD64_PS\fwfiles\etfsboot.com"#pEF,e,b"C:\WinPE_AMD64_PS\fwfiles\efisys.bin" "C:\WinPE_AMD64_PS\media" "C:\ISO\WinPE11_English_x64_Patch.iso"
NOTE: Based on the Index of 1, this guide assumes Windows 11 Home is selected.
OPTIONAL: If this is not the case, adjust the index with any of the following lines, after verifying which version is installed:
Get-ComputerInfo -Property Windows*
Get-ComputerInfo | select WindowsProductName, WindowsVersion, OsHardwareAbstractionLayer
systeminfo /fo csv | ConvertFrom-Csv | select OS*, System*, Hotfix* | Format-List
(Get-WmiObject -class Win32_OperatingSystem).Caption
[System.Environment]::OSVersion.Version
[Environment]::OSVersion
winver
systeminfo
DISM /Image:I:\ /Get-CurrentEdition
DISM /Online /Get-CurrentEdition
DISM /Get-WimInfo /WimFile:"C:\Win11_English_x64v1\sources\install.wim"
12.) %UserProfile%\Desktop\Win64\WinPE\Main_W11_x64.bat -> Add the Power Profile, Sdelete, Optimize the Image to Reduce Boot Time, and Remove Unused Image Entries:
@ECHO OFF
MKDIR "C:\Scratch_Win"
MKDIR "C:\Mount"
DISM /Mount-Image /ImageFile:"C:\Win11_English_x64v1\sources\install.wim" /Index:1 /MountDir:"C:\Mount"
COPY "C:\SysinternalsSuite\Sdelete64.exe" "C:\Mount\Windows\System32"
MKDIR "C:\Mount\Power_Settings"
Copy "%UserProfile%\Desktop\Win64\WinPE\Power_Settings\W10_11.pow" "C:\Mount\Power_Settings\W10_11.pow"
Copy "%UserProfile%\Desktop\Win64\WinPE\Power_Settings\Profile_Power_Setup.bat" "C:\Mount\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\Profile_Power_Setup.bat"
DISM /Image:"C:\Mount" /ScratchDir:"C:\ScratchDir_Win" /Optimize-Image /WimBoot
DISM /Unmount-Image /MountDir:"C:\Mount" /Commit
DISM /Cleanup-Mountpoints
RMDIR /S /Q "C:\ScratchDir_Win"
RMDIR /S /Q "C:\Mount"
DISM /Export-Image /SourceImageFile:"C:\Win11_English_x64v1\sources\install.wim" /SourceIndex:1 /DestinationImageFile:"C:\Win11_English_x64v1\sources\install2.wim"
DEL "C:\Win11_English_x64v1\sources\install.wim"
COPY "C:\Win11_English_x64v1\sources\install2.wim" "C:\Win11_English_x64v1\sources\install.wim"
DEL "C:\Win11_English_x64v1\sources\install2.wim"
MOVE NUL 2>&0
13.) %UserProfile%\Desktop\Win64\WinPE\Patch_W11_x64.bat -> Apply the patches ( If virtual memory is disabled, you will have to run this several times in an entirely separate Command Prompt )
@ECHO OFF
MKDIR "C:\Scratch_Win"
MKDIR "C:\Mount"
DISM /Mount-Image /ImageFile:"C:\Win11_English_x64v1\sources\install.wim" /Index:1 /MountDir:"C:\Mount"
DISM /Add-Package /Image:"C:\Mount" /ScratchDir:"C:\Scratch_Win" /PackagePath:"C:\Patches\MS\Win11\21H2\x64\windows10.0-kb5015814-x64_db4c15264fec1ac8a6794a442a00fe7881337cd3.msu"
DISM /Add-Package /Image:"C:\Mount" /ScratchDir:"C:\Scratch_Win" /PackagePath:"C:\Patches\MS\Win11\21H2\x64\windows10.0-kb5013889-x64-ndp48_852faa94119365c2d2a311a59536bb9b85a5f653.msu"
DISM /Cleanup-Image /Image:"C:\Mount" /ScratchDir:"C:\Scratch_Win" /StartComponentCleanup /ResetBase
DISM /Unmount-Image /MountDir:"C:\Mount" /Commit
DISM /Cleanup-Mountpoints
RMDIR /S /Q "C:\Scratch_Win"
RMDIR /S /Q "C:\Mount"
MOVE NUL 2>&0
OPTIONAL: To be able to slipstream drivers onto the image, you have to export drivers from a running / online operating system image:
Start Powershell -> Start Menu -> Run -> taskmgr -> File -> Run new Task -> %SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe -> Select "Create this task with administrative privileges." -> Click OK.
Export-WindowsDriver -Online -Destination D:\Patches\Drivers
OPTIONAL: %UserProfile%\Desktop\Win64\WinPE\Driver_W11_x64.bat -> If you don't have any drivers, this step is not necessary, although you will have to manually add them later:
@ECHO OFF
MKDIR "C:\Scratch_Win"
MKDIR "C:\Mount"
DISM /Mount-Image /ImageFile:"C:\Win11_English_x64v1\sources\install.wim" /Index:1 /MountDir:"C:\Mount"
DISM /Add-Driver /Image:"C:\Mount" /Driver:"C:\Patches\Drivers" /Recurse
DISM /Cleanup-Image /Image:"C:\Mount" /ScratchDir:"C:\Scratch_Win" /StartComponentCleanup /ResetBase
DISM /Unmount-Image /MountDir:"C:\Mount" /Commit
DISM /Cleanup-Mountpoints
RMDIR /S /Q "C:\Scratch_Win"
RMDIR /S /Q "C:\Mount"
MOVE NUL 2>&0
14.) Create the Windows 11 ISO Image:
REM Example for 64-bit Host, 64-bit Guest:
C:\PROGRA~2\WI3CF2~1\10\ASSESS~1\DEPLOY~1\amd64\Oscdimg\oscdimg.exe -m -o -u1 -udfver102 -lCCCOMA_X64FRE_EN-US_DV9 -bootdata:2#p0,e,b"C:\Win11_English_x64v1\boot\etfsboot.com"#pEF,e,b"C:\Win11_English_x64v1\efi\microsoft\boot\efisys_noprompt.bin" "C:\Win11_English_x64v1" "C:\ISO\Win11_English_x64v1_Patch.iso"
15.) Example: Use diskpart to erase the partition information on the USB Drive:
Open the Command Prompt -> Start Menu -> Run -> taskmgr -> File -> Run new Task -> %SystemRoot%\System32\cmd.exe -> Select "Create this task with administrative privileges." -> Click OK.
C:\Users\<user_name>\Desktop>diskpart
Microsoft DiskPart version 10.0.22000.653
Copyright (C) Microsoft Corporation.
On computer: <user_name>
DISKPART> list disk
Disk ### Status Size Free Dyn Gpt
-------- ------------- ------- ------- --- ---
Disk 3 Online 7392 MB 0 B *
DISKPART> select Disk 3
Disk 3 is now the selected disk.
DISKPART> clean
DiskPart succeeded in cleaning the disk.
DISKPART> list disk
Disk ### Status Size Free Dyn Gpt
-------- ------------- ------- ------- --- ---
* Disk 3 Online 7392 MB 7390 MB *
DISKPART> clean
DiskPart succeeded in cleaning the disk.
DISKPART> list disk
Disk ### Status Size Free Dyn Gpt
-------- ------------- ------- ------- --- ---
* Disk 3 Online 7392 MB 7391 MB
DISKPART> convert gpt
DiskPart successfully converted the selected disk to GPT format.
DISKPART> list disk
Disk ### Status Size Free Dyn Gpt
-------- ------------- ------- ------- --- ---
* Disk 3 Online 7392 MB 7390 MB *
DISKPART> exit
Leaving DiskPart...
C:\Users\<user_name>\Desktop>
16.) Prepare the ISO Images with USB drives that are at least 8GB or larger:
1.) Go to this page: https://rufus.ie/downloads/
2.) Download version 3.x [ Example: Rufus 3.18 (Portable Version) -> https://github.com/pbatard/rufus/releases/download/v3.18/rufus-3.18p.exe ]
3A.) Run "rufus-3.18p.exe" (Disable: Check for updates)
3B.) Select the USB drive you want to apply the image to (Device)
3C.) Boot selection: C:\ISO\WinPE11_English_x64_Patch.iso or C:\ISO\Win11_English_x64v1_Patch.iso
3D.) Partition Scheme: GPT
3E.) Target System: UEFI (non CSM)
3F.) File system: NTFS
3G.) Cluster size: 4096 bytes
3H.) Enable: Quick format
3I.) Enable: Create extended label and icon files
3J.) Click the Command Button with the label "START".
Alternate:
2.) Download version 2.18 [ Rufus 2.18 (Portable Version, Last version compatible with Windows XP and Windows Vista) -> https://github.com/pbatard/rufus/releases/download/v2.18/rufus-2.18p.exe ]
3A.) Run "rufus-2.18p.exe" (Disable: Check for updates -> About... -> Updates)
3B.) Select the USB drive you want to apply the image to (Device)
3C.) Partition Scheme and target system type: GPT partition scheme for UEFI
3D.) File system: NTFS
3E.) Cluster size: 4096 bytes
3F.) Format Options: Enable: Quick format
3G.) Format Options: Enable: Create a bootable disk using: "ISO Image"
3H.) Select: C:\ISO\WinPE11_English_x64_Patch.iso or C:\ISO\Win11_English_x64v1_Patch.iso
3I.) Format Options: Enable: Create extended label and icon files
3J.) Click the Command Button with the label "START".
17.) Example WinPE diskpart script:
REM IMPORTANT: EDIT THIS SCRIPT BASED ON YOUR DRIVE LAYOUT ( DISKPART /S <SCRIPT_NAME_HERE>.txt )
REM EXAMPLE DISKPART SCRIPT TO USE IN WINPE 10 / 11 PRIOR TO LAUNCHING SETUP.EXE ON ANOTHER PARTITION ON THE SAME USB DRIVE
SELECT DISK 0
CLEAN
CLEAN
CONVERT GPT NOERR
CREATE PARTITION EFI SIZE=100
FORMAT FS=FAT32 QUICK
CREATE PARTITION MSR SIZE=16
CREATE PARTITION PRIMARY
ASSIGN
FORMAT FS=NTFS UNIT=4096 QUICK
Jul 16 2022 08:44 PM
Example Installation Guide for Windows 10 32-bit (21H2) on an HP Stream 7 Tablet PC
1.) Download the Windows 10 ISO Image (32-bit) and place in the following folder: C:\ISO
Windows 10 November 2021 Update -> Select edition -> Windows 10 (multi-edition ISO) -> Confirm
Select the product language -> English (United States) -> Confirm
Windows 10 English -> 32-bit Download
NOTE: When Downloading the ISO Images on Windows 10 / 11, you must use a User-Agent Switching Addon, like in the examples below:
User-Agent Switcher and Manager: https://chrome.google.com/webstore/detail/user-agent-switcher-and-m/bhchdcejhohfmigjafbampogmaanbfkg
(Firefox: https://addons.mozilla.org/en-US/firefox/addon/user-agent-string-switcher/ )
2.) Download the following Zip file ( Sysinternals Suite ) to the Desktop folder -> %UserProfile%\Desktop\SysinternalsSuite.zip
NOTE: An unpatched version of WinPE 11 with 32MB of Scratch Space, a minimal amount of cmdlets, is required to keep the ramdisk usage as low as possible ( without harming overall functionality of the image )
NOTE: WinPE 10 2004 and 11 21H2 are the last versions which support x86 / 32-bit environments ( 10_2004 unpatched supports ReFS 3.4, 11_21H2 unpatched supports ReFS version 3.7, 11_22H2 supports ReFS 3.9+, which is only important information if you want to create ReFS partitions with WinPE that you can mount on Windows 10 / 11. This allows you to create a VHD / VHDX file almost instantaneously. )
NOTE: Currently most ReFS tools on Windows 10 / 11 do not support anything beyond revision 3.5, although you can mount up to revision 3.7 it seems (version 3.9 currently shows as a RAW Image on 21H2 )
Resilient File System (ReFS) overview - Additional References -> https://docs.microsoft.com/en-us/windows-server/storage/refs/refs-overview#additional-references
Resilient File System (ReFS) overview - Additional References -> ReFS versions and compatibility matrix -> https://gist.github.com/0xbadfca11/da0598e47dd643d933dc
3.) NOTE: The following requires both WinRAR and the WinPE add-on for the ADK to be installed.
4.) %UserProfile%\Desktop\Win64\WinPE\Initial_W10.bat -> Extract the ISO Image(s) / Archives:
@ECHO OFF
DISM /Cleanup-Mountpoints
MOUNTVOL /R
RMDIR /S /Q "C:\SysinternalsSuite"
RMDIR /S /Q "C:\Win10_21H2_English_x32"
RMDIR /S /Q "C:\Win10_21H2_English_x64"
RMDIR /S /Q "C:\Scratch_Win"
RMDIR /S /Q "C:\Mount"
MKDIR "C:\SysinternalsSuite"
MKDIR "C:\Win10_21H2_English_x32"
MKDIR "C:\Win10_21H2_English_x64"
"%ProgramFiles%\WinRAR\WinRAR.exe" x -ibck -y "%UserProfile%\Desktop\SysinternalsSuite.zip" -r "C:\SysinternalsSuite"
"%ProgramFiles%\WinRAR\WinRAR.exe" x -ibck -y "C:\ISO\Win10_21H2_English_x32.iso" -r "C:\Win10_21H2_English_x32\"
REM "%ProgramFiles%\WinRAR\WinRAR.exe" x -ibck -y "C:\ISO\Win10_21H2_English_x64.iso" -r "C:\Win10_21H2_English_x64\"
MOVE NUL 2>&0
5.) Reuse Startnet.cmd, Profile_Power_Setup.bat, W10_11.pow, WinPE.pow from the previous section (Steps 5-7)
6A.) Download the latest Cumulative Updates for Windows 10 and the .NET Framework:
Windows 10 update history -> https://support.microsoft.com/en-us/topic/windows-10-update-history-857b8ccb-71e4-49e5-b3f6-7073197d98fb
History of Cumulative Updates for .NET Framework for Windows 10 -> https://support.microsoft.com/en-us/topic/history-of-cumulative-updates-for-net-framework-for-windows-10-version-2004-and-windows-server-version-2004-4eef078d-43fb-a58b-360b-1a61779390f0
6B.) Example: For KB5015807 and KB5013887 modify these links for near exact search results:
https://www.catalog.update.microsoft.com/Search.aspx?q= <Insert_KB_Patch_Number_Here> 10 21H1
https://www.catalog.update.microsoft.com/Search.aspx?q= <Insert_KB_Patch_Number_Here> 10 21H1 -"GDR-DU"
https://www.catalog.update.microsoft.com/Search.aspx?q= <Insert_KB_Patch_Number_Here> 10 21H1 -"GDR-DU" -"Dynamic"
https://www.catalog.update.microsoft.com/Search.aspx?q= <Insert_KB_Patch_Number_Here> 10 21H1 -"GDR-DU" -"Dynamic" -"Preview" -"x64"
https://www.catalog.update.microsoft.com/Search.aspx?q= <Insert_KB_Patch_Number_Here> 10 21H1 -"GDR-DU" -"Dynamic" -"Preview" -"x64" -"ARM64"
6C.) Example: Download the following files and place them in this folder: "C:\Patches\MS\Win10\21H2\x86"
2022-07 Cumulative Update for Windows 10 Version 21H1 for x86-based Systems (KB5015807)
https://www.catalog.update.microsoft.com/Search.aspx?q=KB5015807 10 21H1 -"GDR-DU" -"Dynamic" -"Preview" -"x64" -"ARM64"
2022-06 Cumulative Update for .NET Framework 3.5 and 4.8 for Windows 10 Version 21H1 (KB5013887)
https://www.catalog.update.microsoft.com/Search.aspx?q=KB5013887 10 21H1 -"GDR-DU" -"Dynamic" -"Preview" -"x64" -"ARM64"
7.) Read the comments first, and then run the WinPE Image Creation Script / Batch File ( Save As: %UserProfile%\Desktop\Win64\WinPE\WinPE11_21H2_x86.bat )
@ECHO OFF
SETLOCAL
REM NOTE: This could ONLY work when the ADK with the WinPE addon is ALREADY installed, and this batch file is run from the environment itself.
REM NOTE: Some of the syntax / arguments have to be changed, such as the path for the USB Drive (if this is going to work properly.)
REM NOTE: These 3 lines below show how to INSTALL the ADK and WinPE Addon first ->
REM "Other ADK downloads" -> https://docs.microsoft.com/en-us/windows-hardware/get-started/adk-install#other-adk-downloads
REM "Download the ADK For Windows 11" (21H2) -> https://go.microsoft.com/fwlink/?linkid=2165884
REM "Windows PE add-on for the ADK for Windows 11" (21H2) -> https://go.microsoft.com/fwlink/?linkid=2166133
REM https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-add-packages--optional-components-reference?view=windows-10
REM https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-create-usb-bootable-drive#create-a-bootable-winpe-usb-drive
REM https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-adding-powershell-support-to-windows-pe
REM https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-mount-and-customize
REM https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-optimize
REM NOTE: Run this first from the "Deployment and Imaging Tools Environment" Command Prompt: copype x86 "C:\WinPE_x86_PS"
REM ----------------------------------------------------------------------------------------------------
DISM /Mount-Image /ImageFile:"C:\WinPE_x86_PS\media\sources\boot.wim" /Index:1 /MountDir:"C:\WinPE_x86_PS\mount"
REM NOTE: "By default, this is 512MB for PCs with more than 1GB of RAM, otherwise the default is 32MB. Valid values are 32, 64, 128, 256, or 512."
DISM /Set-ScratchSpace:32 /Image:"C:\WinPE_x86_PS\mount"
MKDIR "C:\ScratchDir"
DISM /Add-Package /Image:"C:\WinPE_x86_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\en-us\lp.cab"
DISM /Add-Package /Image:"C:\WinPE_x86_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-Fonts-Legacy.cab"
DISM /Add-Package /Image:"C:\WinPE_x86_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-WMI.cab"
DISM /Add-Package /Image:"C:\WinPE_x86_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\en-us\WinPE-WMI_en-us.cab"
DISM /Add-Package /Image:"C:\WinPE_x86_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-NetFx.cab"
DISM /Add-Package /Image:"C:\WinPE_x86_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\en-us\WinPE-NetFx_en-us.cab"
DISM /Add-Package /Image:"C:\WinPE_x86_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-Scripting.cab"
DISM /Add-Package /Image:"C:\WinPE_x86_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\en-us\WinPE-Scripting_en-us.cab"
DISM /Add-Package /Image:"C:\WinPE_x86_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-PowerShell.cab"
DISM /Add-Package /Image:"C:\WinPE_x86_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\en-us\WinPE-PowerShell_en-us.cab"
DISM /Add-Package /Image:"C:\WinPE_x86_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-StorageWMI.cab"
DISM /Add-Package /Image:"C:\WinPE_x86_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\en-us\WinPE-StorageWMI_en-us.cab"
DISM /Add-Package /Image:"C:\WinPE_x86_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-DismCmdlets.cab"
DISM /Add-Package /Image:"C:\WinPE_x86_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\en-us\WinPE-DismCmdlets_en-us.cab"
DISM /Add-Package /Image:"C:\WinPE_x86_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-SecureBootCmdlets.cab"
DISM /Add-Package /Image:"C:\WinPE_x86_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-SecureStartup.cab"
DISM /Add-Package /Image:"C:\WinPE_x86_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\en-us\WinPE-SecureStartup_en-us.cab"
DISM /Add-Package /Image:"C:\WinPE_x86_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-PlatformId.cab"
DISM /Add-Package /Image:"C:\WinPE_x86_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-Dot3Svc.cab"
DISM /Add-Package /Image:"C:\WinPE_x86_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\en-us\WinPE-Dot3Svc_en-us.cab"
DISM /Add-Package /Image:"C:\WinPE_x86_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-EnhancedStorage.cab"
DISM /Add-Package /Image:"C:\WinPE_x86_PS\mount" /ScratchDir:"C:\ScratchDir" /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\en-us\WinPE-EnhancedStorage_en-us.cab"
DISM /Cleanup-Image /Image:"C:\WinPE_x86_PS\mount" /ScratchDir:"C:\ScratchDir" /StartComponentCleanup /ResetBase
REM NOTE: The following requires: "Sysinternals Suite" -> https://docs.microsoft.com/en-us/sysinternals/downloads/sysinternals-suite
COPY "C:\SysinternalsSuite\Sdelete.exe" "C:\WinPE_x86_PS\mount\windows\system32"
COPY "%UserProfile%\Desktop\Win64\WinPE\Startnet.cmd" "C:\WinPE_x86_PS\mount\windows\system32"
COPY "%UserProfile%\Desktop\Win64\WinPE\WinPE.pow" "C:\WinPE_x86_PS\mount\windows\system32"
DISM /Unmount-Image /MountDir:"C:\WinPE_x86_PS\mount" /Commit
DISM /Cleanup-Mountpoints
RMDIR /S /Q "C:\ScratchDir"
DISM /Export-Image /SourceImageFile:"C:\WinPE_x86_PS\media\sources\boot.wim" /SourceIndex:1 /DestinationImageFile:"C:\WinPE_x86_PS\mount\boot2.wim"
DEL "C:\WinPE_x86_PS\media\sources\boot.wim"
COPY "C:\WinPE_x86_PS\mount\boot2.wim" "C:\WinPE_x86_PS\media\sources\boot.wim"
DEL "C:\WinPE_x86_PS\mount\boot2.wim"
MOVE NUL 2>&0
8.) Choose one of the following to create the WinPE ISO Image, based on the architecture of the running operating system:
REM Example for 64-bit Host, 32-bit Guest:
C:\PROGRA~2\WI3CF2~1\10\ASSESS~1\DEPLOY~1\amd64\Oscdimg\oscdimg.exe -m -o -u1 -udfver102 -lWIN_PE_X86 -bootdata:2#p0,e,b"C:\WinPE_x86_PS\fwfiles\etfsboot.com"#pEF,e,b"C:\WinPE_x86_PS\fwfiles\efisys.bin" "C:\WinPE_x86_PS\media" "C:\ISO\WinPE11_21H2_English_x86_Low_Memory.iso"
REM Example for 32-bit Host, 32-bit Guest:
C:\PROGRA~2\WI3CF2~1\10\ASSESS~1\DEPLOY~1\x86\Oscdimg\oscdimg.exe -m -o -u1 -udfver102 -lWIN_PE_X86 -bootdata:2#p0,e,b"C:\WinPE_x86_PS\fwfiles\etfsboot.com"#pEF,e,b"C:\WinPE_x86_PS\fwfiles\efisys.bin" "C:\WinPE_x86_PS\media" "C:\ISO\WinPE11_21H2_English_x86_Low_Memory.iso"
NOTE: Based on the Index of 1, this guide assumes Windows 10 Home is installed on the Tablet PC.
OPTIONAL: If this is not the case, adjust the index with any of the following lines, after verifying which version is installed:
Get-ComputerInfo -Property Windows*
Get-ComputerInfo | select WindowsProductName, WindowsVersion, OsHardwareAbstractionLayer
systeminfo /fo csv | ConvertFrom-Csv | select OS*, System*, Hotfix* | Format-List
(Get-WmiObject -class Win32_OperatingSystem).Caption
[System.Environment]::OSVersion.Version
[Environment]::OSVersion
winver
systeminfo
DISM /Image:I:\ /Get-CurrentEdition
DISM /Online /Get-CurrentEdition
DISM /Get-WimInfo /WimFile:"C:\Win10_21H2_English_x32\sources\install.wim"
9.) %UserProfile%\Desktop\Win64\WinPE\Main_W10_x86.bat -> Add the Power Profile, Sdelete, Optimize the Image to Reduce Boot Time, and Remove Unused Image Entries:
@ECHO OFF
MKDIR "C:\Scratch_Win"
MKDIR "C:\Mount"
DISM /Mount-Image /ImageFile:"C:\Win10_21H2_English_x32\sources\install.wim" /Index:1 /MountDir:"C:\Mount"
COPY "C:\SysinternalsSuite\Sdelete.exe" "C:\Mount\Windows\System32"
MKDIR "C:\Mount\Power_Settings"
Copy "%UserProfile%\Desktop\Win64\WinPE\Power_Settings\W10_11.pow" "C:\Mount\Power_Settings\W10_11.pow"
Copy "%UserProfile%\Desktop\Win64\WinPE\Power_Settings\Profile_Power_Setup.bat" "C:\Mount\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\Profile_Power_Setup.bat"
DISM /Image:"C:\Mount" /ScratchDir:"C:\ScratchDir_Win" /Optimize-Image /WimBoot
DISM /Unmount-Image /MountDir:"C:\Mount" /Commit
DISM /Cleanup-Mountpoints
RMDIR /S /Q "C:\ScratchDir_Win"
RMDIR /S /Q "C:\Mount"
DISM /Export-Image /SourceImageFile:"C:\Win10_21H2_English_x32\sources\install.wim" /SourceIndex:1 /DestinationImageFile:"C:\Win10_21H2_English_x32\sources\install2.wim"
DEL "C:\Win10_21H2_English_x32\sources\install.wim"
COPY "C:\Win10_21H2_English_x32\sources\install2.wim" "C:\Win10_21H2_English_x32\sources\install.wim"
DEL "C:\Win10_21H2_English_x32\sources\install2.wim"
MOVE NUL 2>&0
10.) %UserProfile%\Desktop\Win64\WinPE\Patch_W10_x86.bat -> Apply the patches ( If virtual memory is disabled, you will have to run this several times in an entirely separate Command Prompt )
@ECHO OFF
MKDIR "C:\Scratch_Win"
MKDIR "C:\Mount"
DISM /Mount-Image /ImageFile:"C:\Win10_21H2_English_x32\sources\install.wim" /Index:1 /MountDir:"C:\Mount"
DISM /Add-Package /Image:"C:\Mount" /ScratchDir:"C:\Scratch_Win" /PackagePath:"C:\Patches\MS\Win10\21H2\x86\windows10.0-kb5015807-x86_f8b27df705faab3fe1deafe9fedeed8b9c7e2e6a.msu"
DISM /Add-Package /Image:"C:\Mount" /ScratchDir:"C:\Scratch_Win" /PackagePath:"C:\Patches\MS\Win10\21H2\x86\windows10.0-kb5013887-x86-ndp48_2481ad51ae585b293315da873f4a5b43e3d5ea22.msu"
DISM /Cleanup-Image /Image:"C:\Mount" /ScratchDir:"C:\Scratch_Win" /StartComponentCleanup /ResetBase
DISM /Unmount-Image /MountDir:"C:\Mount" /Commit
DISM /Cleanup-Mountpoints
RMDIR /S /Q "C:\Scratch_Win"
RMDIR /S /Q "C:\Mount"
MOVE NUL 2>&0
OPTIONAL: To be able to slipstream drivers onto the image, preserve touchscreen functionality, etc, you have to export drivers from running operating system image ( Windows 8.x, Windows 10, etc ) that was already on the Tablet PC ( to a USB drive with an OTG cable )
Start Powershell -> Start Menu -> Run -> taskmgr -> File -> Run new Task -> %SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe -> Select "Create this task with administrative privileges." -> Click OK.
Export-WindowsDriver -Online -Destination D:\Patches\HP_Stream\HP_Stream7_Drivers
OPTIONAL: %UserProfile%\Desktop\Win64\WinPE\Driver_HP_Stream_7_W10_x86.bat -> If you don't have any drivers, this step is not necessary, although you will have to add them later with a USB Hub + Mouse + Keyboard + USB Drive / MicroSD Card:
@ECHO OFF
MKDIR "C:\Scratch_Win"
MKDIR "C:\Mount"
DISM /Mount-Image /ImageFile:"C:\Win10_21H2_English_x32\sources\install.wim" /Index:1 /MountDir:"C:\Mount"
DISM /Add-Driver /Image:"C:\Mount" /Driver:"C:\Patches\HP_Stream\HP_Stream7_Drivers" /Recurse
DISM /Cleanup-Image /Image:"C:\Mount" /ScratchDir:"C:\Scratch_Win" /StartComponentCleanup /ResetBase
DISM /Unmount-Image /MountDir:"C:\Mount" /Commit
DISM /Cleanup-Mountpoints
RMDIR /S /Q "C:\Scratch_Win"
RMDIR /S /Q "C:\Mount"
MOVE NUL 2>&0
11.) Choose one of the following to create the Windows 10 ISO Image, based on the architecture of the running operating system:
REM Example for 64-bit Host, 32-bit Guest:
C:\PROGRA~2\WI3CF2~1\10\ASSESS~1\DEPLOY~1\amd64\Oscdimg\oscdimg.exe -m -o -u1 -udfver102 -lCCCOMA_X86FRE_EN-US_DV9 -bootdata:2#p0,e,b"C:\Win10_21H2_English_x32\boot\etfsboot.com"#pEF,e,b"C:\Win10_21H2_English_x32\efi\microsoft\boot\efisys_noprompt.bin" "C:\Win10_21H2_English_x32" "C:\ISO\HP_Stream_7_Win10_21H2_English_x32_patch.iso"
REM Example for 32-bit Host, 32-bit Guest:
C:\PROGRA~2\WI3CF2~1\10\ASSESS~1\DEPLOY~1\x86\Oscdimg\oscdimg.exe -m -o -u1 -udfver102 -lCCCOMA_X86FRE_EN-US_DV9 -bootdata:2#p0,e,b"C:\Win10_21H2_English_x32\boot\etfsboot.com"#pEF,e,b"C:\Win10_21H2_English_x32\efi\microsoft\boot\efisys_noprompt.bin" "C:\Win10_21H2_English_x32" "C:\ISO\HP_Stream_7_Win10_21H2_English_x32_patch.iso"
Unrelated / Unused Examples:
REM Example for 64-bit Host, 32-bit Guest: C:\PROGRA~2\WI3CF2~1\10\ASSESS~1\DEPLOY~1\amd64\Oscdimg\oscdimg.exe -m -o -u1 -udfver102 -lCCCOMA_X86FRE_EN-US_DV9 -bootdata:2#p0,e,b"C:\Win10_21H2_English_x32\boot\etfsboot.com"#pEF,e,b"C:\Win10_21H2_English_x32\efi\microsoft\boot\efisys_noprompt.bin" "C:\Win10_21H2_English_x32" "C:\ISO\Win10_21H2_English_x32_patch.iso"
REM Example for 64-bit Host, 64-bit Guest: C:\PROGRA~2\WI3CF2~1\10\ASSESS~1\DEPLOY~1\amd64\Oscdimg\oscdimg.exe -m -o -u1 -udfver102 -lCCCOMA_X64FRE_EN-US_DV9 -bootdata:2#p0,e,b"C:\Win10_21H2_English_x64\boot\etfsboot.com"#pEF,e,b"C:\Win10_21H2_English_x64\efi\microsoft\boot\efisys_noprompt.bin" "C:\Win10_21H2_English_x64" "C:\ISO\Win10_21H2_English_x64_patch.iso"
12.) Reuse the example from the previous section (Step 15) to erase the partition information on the USB Drive
13.) Prepare the ISO Image(s) on USB drives that are at least 8GB or larger:
1.) Go to this page: https://rufus.ie/downloads/
2.) Download version 3.x [ Example: Rufus 3.18 (Portable Version) -> https://github.com/pbatard/rufus/releases/download/v3.18/rufus-3.18p.exe ]
3A.) Run "rufus-3.18p.exe" (Disable: Check for updates)
3B.) Select the USB drive you want to apply the image to (Device)
3C.) Boot selection: C:\ISO\WinPE11_21H2_English_x86_Low_Memory.iso
3D.) Partition Scheme: GPT
3E.) Target System: UEFI (non CSM)
3F.) File system: NTFS
3G.) Cluster size: 4096 bytes
3H.) Enable: Quick format
3I.) Enable: Create extended label and icon files
3J.) Click the Command Button with the label "START".
Alternate:
2.) Download version 2.18 [ Rufus 2.18 (Portable Version, Last version compatible with Windows XP and Windows Vista) -> https://github.com/pbatard/rufus/releases/download/v2.18/rufus-2.18p.exe ]
3A.) Run "rufus-2.18p.exe" (Disable: Check for updates -> About... -> Updates)
3B.) Select the USB drive you want to apply the image to (Device)
3C.) Partition Scheme and target system type: GPT partition scheme for UEFI
3D.) File system: NTFS
3E.) Cluster size: 4096 bytes
3F.) Format Options: Enable: Quick format
3G.) Format Options: Enable: Create a bootable disk using: "ISO Image"
3H.) Select: C:\ISO\WinPE11_21H2_English_x86_Low_Memory.iso
3I.) Format Options: Enable: Create extended label and icon files
3J.) Click the Command Button with the label "START".
14.) Example: Shrink the WinPE partition to create room for another partition to store the Windows 10 Installation Image:
NOTE: You could also create the image within a Virtual Machine, and apply it as a WIM / FFU utilizing the CompactOS feature ( WIMBOOT optimization disabled )
Open the Command Prompt -> Start Menu -> Run -> taskmgr -> File -> Run new Task -> %SystemRoot%\System32\cmd.exe -> Select "Create this task with administrative privileges." -> Click OK.
C:\Users\<user_name>\Desktop>diskpart
Microsoft DiskPart version 10.0.22000.653
Copyright (C) Microsoft Corporation.
On computer: <user_name>
DISKPART> list disk
Disk ### Status Size Free Dyn Gpt
-------- ------------- ------- ------- --- ---
Disk 3 Online 7392 MB 0 B *
DISKPART> select Disk 3
Disk 3 is now the selected disk.
DISKPART> list disk
Disk ### Status Size Free Dyn Gpt
-------- ------------- ------- ------- --- ---
* Disk 3 Online 7392 MB 0 B *
DISKPART> list partition
Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 Primary 7389 MB 1024 KB
Partition 2 Primary 1024 KB 7390 MB
DISKPART> select partition 1
Partition 1 is now the selected partition.
DISKPART> shrink
DiskPart successfully shrunk the volume by: 4267 MB
DISKPART> create partition primary
DiskPart succeeded in creating the specified partition.
DISKPART> format fs=ntfs unit=4096 label="CCCOMA_X86FRE_EN-US_DV9" quick
100 percent completed
DiskPart successfully formatted the volume.
DISKPART> assign
DiskPart successfully assigned the drive letter or mount point.
DISKPART> list volume
Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----------- ----- ---------- ------- --------- --------
* Volume 3 K CCCOMA_X86F NTFS Removable 4267 MB Healthy
DISKPART> exit
Leaving DiskPart...
C:\Users\<user_name>\Desktop>CD\"Win10_21H2_English_x32"
C:\Win10_21H2_English_x32>XCOPY "*.*" "K:\" /E /C /I /Q /G /H /R /Y /B /J
907 File(s) copied
C:\Win10_21H2_English_x32>exit
15.) Reuse the Example WinPE diskpart script from the previous section (Step #17)
NOTE: For this to succeed, you have to boot into WinPE, partition the 32GB eMMC drive, and then manually launch Setup.exe, although you could boot the image from a MicroSD card as well (as there is not enough memory available to create a ramdisk / shim installer / install shim on this particular tablet PC.) This also works on other 32-bit PCs with 1GB of memory.
Jul 16 2022 09:46 PM
List of Redistributables / Drivers:
Download .NET SDKs / Runtimes for Visual Studio | Download .NET Framework
Microsoft Visual C++ Redistributable latest supported downloads
Universal CRT deployment | The Visual Basic 6.0 runtime
DirectX End-User Runtimes (June 2010)
Java Downloads for All Operating Systems
Driver List:
Realtek PCIe FE / GBE / 2.5G / Gaming Ethernet Family Controller Software
Realtek High Definition Audio Codecs Software
Realtek Card Reader Controllers Software
NOTE: When downloading Realtek drivers: If the Captcha contains + ( plus ) signs / operators, or a cross symbol, then you have to go back and retry the download until you get a different Captcha Code / Challenge.
AMD Drivers and Support | NVIDIA Driver Downloads
Intel Products (VERY useful for locating drivers) | Intel Ark (Advanced Search)
Intel Wireless Bluetooth for Windows 10 and Windows 11
Windows 10 and Windows 11 Wi-Fi Drivers for Intel Wireless Adapters
Intel Graphics Driver for Windows [15.45] | Intel Graphics - Windows DCH Drivers
IT Administrator Links:
Intel PROSet/Wireless Software | Intel Wireless Bluetooth Software
Administrative Tools for Intel Network Adapters