- Local time
- 1:32 PM
- Posts
- 298
- OS
- Window 11 v24H2 Build 26100.2033
Hello Everyone,
Welcome,
Universal Windows 11 Deployment & Bootloader Provisioning Toolkit (UEFI / MBR)
Created and Developed in collaboration with Google Gemini AI
Overview:
This toolkit provides a complete, 100% native batch-driven framework for deploying Windows 11 images directly from WinPE or Live Windows environments. It supports both modern UEFI (GPT) and Legacy BIOS (MBR) architectures, offers automated and non-destructive disk options, handles dynamic BCD pointer resolution, provisions fallback bootloaders, and includes deep post-deployment verification.
Zero external dependencies or third-party binaries required. All volume parsing and disk queries run directly via pure Windows CMD commands and native DiskPart script redirection, making it fully compatible with minimal WinPE environments where utilities like `findstr.exe` are missing.
---
Key Features:
1. Three Disk Deployment Modes:
- Option 1 (Non-destructive): Deploys directly to an existing partition without wiping; auto-appends multi-boot entries.
- Option 2 (Clean MBR): Converts disk to MBR, provisions a 500 MB Active "System Reserved" partition and OS volume.
- Option 3 (Clean GPT/UEFI): Converts disk to GPT, provisions a 260 MB FAT32 EFI System Partition (ESP), 16 MB MSR, and OS volume.
2. Disk-to-Volume Association: `create_uefi.bat` associates parent disk numbers with FAT32 volumes so you never target the wrong EFI partition on multi-drive rigs.
3. UEFI Fallback Provisioning: Automatically writes both primary `\EFI\Microsoft\Boot\bootmgfw.efi` and fallback `\EFI\Boot\bootx64.efi` for stubborn motherboard firmwares.
4. BCD Dynamic Pointer Fix: Automatically converts unresolved `{default}` dynamic "locate" pointers into fixed physical partitions.
5. Automated Verification Suite: Validates critical kernel binaries (`ntoskrnl.exe`, `winload.efi`, `winload.exe`), registry hives (`SYSTEM`, `SOFTWARE`), mounts EFI/System Reserved partitions, and displays all registered OS loaders.
---
1. deploy_win11.bat (Main Deployment Engine)
---
2. create_uefi.bat (EFI & Fallback Provisioner)
---
3. verify_deploy.bat (Universal Verification Suite)
PROCEDURE TO USE BATCH FILES
MBR WORKFLOW
GPT WORKFLOW
THANKS FOR READING THIS THREAD AND SHARING YOUR VALUABLE TIME.
Welcome,
Universal Windows 11 Deployment & Bootloader Provisioning Toolkit (UEFI / MBR)
Created and Developed in collaboration with Google Gemini AI
Overview:
This toolkit provides a complete, 100% native batch-driven framework for deploying Windows 11 images directly from WinPE or Live Windows environments. It supports both modern UEFI (GPT) and Legacy BIOS (MBR) architectures, offers automated and non-destructive disk options, handles dynamic BCD pointer resolution, provisions fallback bootloaders, and includes deep post-deployment verification.
Zero external dependencies or third-party binaries required. All volume parsing and disk queries run directly via pure Windows CMD commands and native DiskPart script redirection, making it fully compatible with minimal WinPE environments where utilities like `findstr.exe` are missing.
---
Key Features:
1. Three Disk Deployment Modes:
- Option 1 (Non-destructive): Deploys directly to an existing partition without wiping; auto-appends multi-boot entries.
- Option 2 (Clean MBR): Converts disk to MBR, provisions a 500 MB Active "System Reserved" partition and OS volume.
- Option 3 (Clean GPT/UEFI): Converts disk to GPT, provisions a 260 MB FAT32 EFI System Partition (ESP), 16 MB MSR, and OS volume.
2. Disk-to-Volume Association: `create_uefi.bat` associates parent disk numbers with FAT32 volumes so you never target the wrong EFI partition on multi-drive rigs.
3. UEFI Fallback Provisioning: Automatically writes both primary `\EFI\Microsoft\Boot\bootmgfw.efi` and fallback `\EFI\Boot\bootx64.efi` for stubborn motherboard firmwares.
4. BCD Dynamic Pointer Fix: Automatically converts unresolved `{default}` dynamic "locate" pointers into fixed physical partitions.
5. Automated Verification Suite: Validates critical kernel binaries (`ntoskrnl.exe`, `winload.efi`, `winload.exe`), registry hives (`SYSTEM`, `SOFTWARE`), mounts EFI/System Reserved partitions, and displays all registered OS loaders.
---
1. deploy_win11.bat (Main Deployment Engine)
Code:
@Echo off
Title Universal Windows 11 Deployment Utility (UEFI / MBR)
Setlocal EnableDelayedExpansion
:: Ensure System32 binaries are always in PATH
Set "PATH=%SystemRoot%\System32;%SystemRoot%;%PATH%"
:: 1. Locate install.wim across drives
Set "WIM_PATH="
For %%i in (C D E F G H I J K L M N O P Q R S T U V W Y Z) Do (
If Exist "%%i:\sources\install.wim" (
Set "WIM_PATH=%%i:\sources\install.wim"
Goto :FoundWim
)
If Exist "%%i:\sources\install.esd" (
Set "WIM_PATH=%%i:\sources\install.esd"
Goto :FoundWim
)
)
:FoundWim
If not defined WIM_PATH (
Echo [FAIL] Neither install.wim nor install.esd found on any available drive.
Pause
Exit /B 1
)
:: 2. Display available editions and indexes
Echo.
Echo ===============================================================================
Echo Available Editions in %WIM_PATH%:
Echo ===============================================================================
dism /Get-ImageInfo /ImageFile:"%WIM_PATH%"
Echo ===============================================================================
Echo.
:: 3. Prompt user for the target index
Set "INDEX_NUM=1"
Set /p "INDEX_NUM=Enter the Index number to install [default: 1]: "
:: 4. Disk Configuration Menu
Echo.
Echo ===============================================================================
Echo Disk Configuration:
Echo ===============================================================================
Echo [1] Use an existing partition [no wipe]
Echo [2] Wipe an entire disk and create MBR [System Reserved + OS]
Echo [3] Wipe an entire disk and create GPT [EFI + MSR + OS]
Echo ===============================================================================
Set "DISK_CONFIG=1"
Set /p "DISK_CONFIG=Enter choice [1, 2, or 3, default: 1]: "
If "%DISK_CONFIG%"=="2" Goto :PartitionDiskMBR
If "%DISK_CONFIG%"=="3" Goto :PartitionDiskGPT
Goto :SelectExisting
:: -------------------------------------------------------------------------------
:: Branch A: Wipe and Partition as MBR
:: -------------------------------------------------------------------------------
:PartitionDiskMBR
Echo.
(Echo lis dis) | diskpart
Echo.
:SelectDiskNumMBR
Set "TARGET_DISK="
Set /p "TARGET_DISK=Enter the DISK NUMBER to completely wipe and format as MBR: "
If not defined TARGET_DISK Goto :SelectDiskNumMBR
Set "CHECK_DIGIT=%TARGET_DISK%"
For /F "delims=0123456789" %%A in ("%CHECK_DIGIT%") Do Set "CHECK_DIGIT="
If not defined CHECK_DIGIT (
Echo Invalid input. Please enter numbers only.
Goto :SelectDiskNumMBR
)
Echo.
Echo *******************************************************************************
Echo WARNING: ALL DATA ON DISK %TARGET_DISK% WILL BE PERMANENTLY ERASED [MBR]!
Echo *******************************************************************************
Set /p "CONFIRM=Type YES to proceed with wipe: "
If /I not "%CONFIRM%"=="YES" (
Echo Disk partitioning aborted by user.
Goto :SelectExisting
)
(Echo sel vol S & Echo remove noerr & Echo sel vol W & Echo remove noerr) | diskpart >nul 2>&1
Set "DP_SCRIPT=%TEMP%\mbr_setup.txt"
>"%DP_SCRIPT%" Echo sel dis %TARGET_DISK%
>>"%DP_SCRIPT%" Echo clean
>>"%DP_SCRIPT%" Echo convert mbr
>>"%DP_SCRIPT%" Echo create partition primary size=500
>>"%DP_SCRIPT%" Echo format quick fs=ntfs label="System Reserved"
>>"%DP_SCRIPT%" Echo active
>>"%DP_SCRIPT%" Echo assign letter=S
>>"%DP_SCRIPT%" Echo create partition primary
>>"%DP_SCRIPT%" Echo format quick fs=ntfs label="Windows"
>>"%DP_SCRIPT%" Echo assign letter=W
Echo.
Echo Partitioning and formatting Disk %TARGET_DISK% as MBR...
diskpart /s "%DP_SCRIPT%" >nul 2>&1
Del "%DP_SCRIPT%" >nul 2>&1
Set "TARGET_DRIVE=W"
Set "BOOT_MODE=2"
Set "HAS_SYS_RES=1"
Echo [PASS] Disk %TARGET_DISK% partitioned as MBR. Target OS drive is W:\.
Goto :ApplyOS
:: -------------------------------------------------------------------------------
:: Branch B: Wipe and Partition as GPT (UEFI)
:: -------------------------------------------------------------------------------
:PartitionDiskGPT
Echo.
(Echo lis dis) | diskpart
Echo.
:SelectDiskNumGPT
Set "TARGET_DISK="
Set /p "TARGET_DISK=Enter the DISK NUMBER to completely wipe and format as GPT: "
If not defined TARGET_DISK Goto :SelectDiskNumGPT
Set "CHECK_DIGIT=%TARGET_DISK%"
For /F "delims=0123456789" %%A in ("%CHECK_DIGIT%") Do Set "CHECK_DIGIT="
If not defined CHECK_DIGIT (
Echo Invalid input. Please enter numbers only.
Goto :SelectDiskNumGPT
)
Echo.
Echo *******************************************************************************
Echo WARNING: ALL DATA ON DISK %TARGET_DISK% WILL BE PERMANENTLY ERASED [GPT/UEFI]!
Echo *******************************************************************************
Set /p "CONFIRM=Type YES to proceed with wipe: "
If /I not "%CONFIRM%"=="YES" (
Echo Disk partitioning aborted by user.
Goto :SelectExisting
)
(Echo sel vol S & Echo remove noerr & Echo sel vol W & Echo remove noerr) | diskpart >nul 2>&1
Set "DP_SCRIPT=%TEMP%\gpt_setup.txt"
>"%DP_SCRIPT%" Echo sel dis %TARGET_DISK%
>>"%DP_SCRIPT%" Echo clean
>>"%DP_SCRIPT%" Echo convert gpt
>>"%DP_SCRIPT%" Echo create partition efi size=260
>>"%DP_SCRIPT%" Echo format quick fs=fat32 label="System"
>>"%DP_SCRIPT%" Echo assign letter=S
>>"%DP_SCRIPT%" Echo create partition msr size=16
>>"%DP_SCRIPT%" Echo create partition primary
>>"%DP_SCRIPT%" Echo format quick fs=ntfs label="Windows"
>>"%DP_SCRIPT%" Echo assign letter=W
Echo.
Echo Partitioning and formatting Disk %TARGET_DISK% as GPT...
diskpart /s "%DP_SCRIPT%" >nul 2>&1
Del "%DP_SCRIPT%" >nul 2>&1
Set "TARGET_DRIVE=W"
Set "BOOT_MODE=1"
Set "HAS_SYS_RES=1"
Echo [PASS] Disk %TARGET_DISK% partitioned as GPT. Target OS drive is W:\.
Goto :ApplyOS
:: -------------------------------------------------------------------------------
:: Branch C: Select Existing Volume
:: -------------------------------------------------------------------------------
:SelectExisting
Echo.
Echo ===============================================================================
Echo Available Volumes:
Echo ===============================================================================
(Echo lis vol) | diskpart
Echo ===============================================================================
Echo.
:PromptTarget
Set "TARGET_DRIVE=D"
Set /p "TARGET_DRIVE=Enter the target drive letter to install to [default: D]: "
Set "TARGET_DRIVE=%TARGET_DRIVE:~0,1%"
If not Exist "%TARGET_DRIVE%:\" (
Echo [FAIL] Drive %TARGET_DRIVE%:\ does not exist. Please check the volume list.
Goto :PromptTarget
)
Echo.
Echo ===============================================================================
Echo Select Firmware / Boot Mode for Existing Drive:
Echo ===============================================================================
Echo [1] UEFI [GPT - Writes to EFI System Partition]
Echo [2] MBR / Legacy BIOS [Auto-detect System Reserved or existing boot store]
Echo [3] MBR / Legacy BIOS [Standalone - write bootmgr directly to %TARGET_DRIVE%:]
Echo ===============================================================================
Set "BOOT_MODE=1"
Set /p "BOOT_MODE=Enter choice [1, 2, or 3, default: 1]: "
Set "HAS_SYS_RES=0"
Set "EXISTING_BOOT_VOL="
If "%BOOT_MODE%"=="2" (
:: Search for an unlettered System Reserved partition without findstr
Set "TMP_DP_LIST=%TEMP%\dp_mbr_%RANDOM%.txt"
Set "TMP_DP_OUT=%TEMP%\dp_mbrout_%RANDOM%.txt"
(Echo list volume) > "!TMP_DP_LIST!"
diskpart /s "!TMP_DP_LIST!" > "!TMP_DP_OUT!" 2>&1
For /f "tokens=1,2,3,4,5,6,7*" %%A in ('type "!TMP_DP_OUT!"') Do (
If /i "%%A"=="Volume" (
Set "IS_SYS="
If /i "%%C"=="System" Set "IS_SYS=1"
If /i "%%D"=="System" Set "IS_SYS=1"
If /i "%%C"=="System Rese" Set "IS_SYS=1"
If defined IS_SYS (
(Echo select volume %%B & Echo assign letter=S) | diskpart >nul 2>&1
If Exist "S:\Boot\BCD" (
Set "EXISTING_BOOT_VOL=S:"
Set "HAS_SYS_RES=1"
)
)
)
)
Del /f /q "!TMP_DP_LIST!" "!TMP_DP_OUT!" >nul 2>&1
:: Check fixed local drives C: or D: as fallback
If not defined EXISTING_BOOT_VOL (
For %%D in (C D) Do (
If Exist "%%D:\Boot\BCD" Set "EXISTING_BOOT_VOL=%%D:"
)
)
)
Goto :ApplyOS
:: -------------------------------------------------------------------------------
:: 5. Image Extraction via DISM
:: -------------------------------------------------------------------------------
:ApplyOS
Cls
Echo ===============================================================================
Echo Applying Image
Echo ===============================================================================
Echo Source WIM : %WIM_PATH%
Echo Selected Index: %INDEX_NUM%
Echo Target Drive : %TARGET_DRIVE%:\
Echo ===============================================================================
Echo.
Echo Extracting Windows files... [This may take several minutes]
Echo.
dism /Apply-Image /ImageFile:"%WIM_PATH%" /Index:%INDEX_NUM% /ApplyDir:%TARGET_DRIVE%:\
If %errorlevel% neq 0 (
Echo.
Echo [FAIL] DISM failed to apply the image [Error Level: %errorlevel%].
Pause
Goto :Cleanup
)
Echo.
Echo [PASS] Image applied successfully to %TARGET_DRIVE%:\.
:: -------------------------------------------------------------------------------
:: 6. Boot Configuration
:: -------------------------------------------------------------------------------
If "%BOOT_MODE%"=="1" (
Goto :ConfigureUEFI
) Else (
Goto :ConfigureMBR
)
:ConfigureUEFI
Echo.
Echo ===============================================================================
Echo Configuring UEFI Bootloader and NVRAM
Echo ===============================================================================
If Exist "%~dp0create_uefi.bat" (
Echo Launching create_uefi.bat for target %TARGET_DRIVE%: ...
Call "%~dp0create_uefi.bat" %TARGET_DRIVE%:
Goto :PostBootCheck
)
If not exist "S:\" (
Echo [*] Locating EFI System Partition (FAT32)...
Set "ESP_VOL="
Set "TMP_DP_LIST=%TEMP%\dp_fat_%RANDOM%.txt"
Set "TMP_DP_OUT=%TEMP%\dp_fatout_%RANDOM%.txt"
(Echo list volume) > "!TMP_DP_LIST!"
diskpart /s "!TMP_DP_LIST!" > "!TMP_DP_OUT!" 2>&1
For /f "tokens=1,2,3,4,5,6,7*" %%A in ('type "!TMP_DP_OUT!"') Do (
If /i "%%A"=="Volume" (
Set "IS_FAT="
If /i "%%D"=="FAT32" Set "IS_FAT=1"
If /i "%%E"=="FAT32" Set "IS_FAT=1"
If /i "%%F"=="FAT32" Set "IS_FAT=1"
If defined IS_FAT (
Set "RAW_V=%%B"
Set "ESP_VOL=!RAW_V: =!"
)
)
)
Del /f /q "!TMP_DP_LIST!" "!TMP_DP_OUT!" >nul 2>&1
If defined ESP_VOL (
(Echo sel vol !ESP_VOL! & Echo assign letter=S) | diskpart >nul 2>&1
)
)
If not Exist "S:\" (
Echo [FAIL] Could not mount FAT32 EFI partition to S:.
Goto :End
)
If Exist "S:\EFI\Microsoft\Boot\BCD" attrib -s -h -r "S:\EFI\Microsoft\Boot\BCD" >nul 2>&1
"%SystemRoot%\System32\bcdboot.exe" %TARGET_DRIVE%:\Windows /s S: /f UEFI
If %errorlevel% equ 0 (
Echo [PASS] UEFI boot files written successfully.
If not Exist "S:\EFI\Boot" mkdir "S:\EFI\Boot"
If Exist "S:\EFI\Microsoft\Boot\bootmgfw.efi" (
copy /y "S:\EFI\Microsoft\Boot\bootmgfw.efi" "S:\EFI\Boot\bootx64.efi" >nul 2>&1
Echo [PASS] Created fallback bootx64.efi.
)
"%SystemRoot%\System32\bcdedit.exe" /enum firmware >nul 2>&1
If !errorlevel! equ 0 (
"%SystemRoot%\System32\bcdboot.exe" %TARGET_DRIVE%:\Windows /s S: /f UEFI /p >nul 2>&1
Echo [PASS] NVRAM entry synchronized.
)
) Else (
Echo [FAIL] bcdboot failed to write UEFI boot files.
)
(Echo sel vol S & Echo remove letter=S) | diskpart >nul 2>&1
Goto :PostBootCheck
:ConfigureMBR
Echo.
If defined EXISTING_BOOT_VOL (
Echo [*] Updating existing bootloader on %EXISTING_BOOT_VOL%...
"%SystemRoot%\System32\bcdboot.exe" %TARGET_DRIVE%:\Windows /s %EXISTING_BOOT_VOL% /f BIOS
If %errorlevel% equ 0 (
Echo [PASS] Appended new OS entry to existing BCD on %EXISTING_BOOT_VOL%.
) Else (
Echo [FAIL] BCDBoot failed to update %EXISTING_BOOT_VOL%.
)
If "%HAS_SYS_RES%"=="1" (
(Echo select volume S & Echo remove letter=S) | diskpart >nul 2>&1
)
Goto :PostBootCheck
)
If "%HAS_SYS_RES%"=="1" (
Echo Configuring MBR boot files on System Reserved partition...
"%SystemRoot%\System32\bcdboot.exe" %TARGET_DRIVE%:\Windows /s S: /f BIOS
If !errorlevel! equ 0 (
Echo [PASS] MBR bootloader configured on System Reserved.
) Else (
Echo [FAIL] BCDboot failed to write boot files to S:.
)
(Echo sel vol S & Echo remove letter=S) | diskpart >nul 2>&1
) Else (
Echo Configuring MBR boot files directly on %TARGET_DRIVE%:\...
"%SystemRoot%\System32\bcdboot.exe" %TARGET_DRIVE%:\Windows /s %TARGET_DRIVE%: /f BIOS
If !errorlevel! equ 0 (
(Echo sel vol %TARGET_DRIVE% & Echo active) | diskpart >nul 2>&1
Echo [PASS] MBR bootloader configured on %TARGET_DRIVE%:.
) Else (
Echo [FAIL] BCDboot failed to write MBR boot files.
)
)
Goto :PostBootCheck
:: -------------------------------------------------------------------------------
:: 7. Resolve Any Dynamic Locate Pointers in BCD
:: -------------------------------------------------------------------------------
:PostBootCheck
Echo.
Echo [*] Checking BCD for dynamic locate pointers...
For /f "tokens=1,2" %%A in ('"%SystemRoot%\System32\bcdedit.exe" /enum osloader') Do (
If /i "%%A"=="identifier" (
Set "ENTRY_ID=%%B"
For /f "tokens=1,2*" %%X in ('"%SystemRoot%\System32\bcdedit.exe" /enum !ENTRY_ID!') Do (
If /i "%%X"=="osdevice" (
Set "DEV_VAL=%%Y"
If /i "!DEV_VAL:~0,6!"=="locate" (
Echo [*] Resolving dynamic locate pointer for entry !ENTRY_ID!...
"%SystemRoot%\System32\bcdedit.exe" /set !ENTRY_ID! device partition=%TARGET_DRIVE%: >nul 2>&1
"%SystemRoot%\System32\bcdedit.exe" /set !ENTRY_ID! osdevice partition=%TARGET_DRIVE%: >nul 2>&1
)
)
)
)
)
Echo [PASS] BCD validation completed.
Goto :End
:Cleanup
If "%HAS_SYS_RES%"=="1" (
(Echo sel vol S & Echo remove letter=S) | diskpart >nul 2>&1
)
:End
Echo.
Echo ===============================================================================
Echo Deployment Process Complete.
Echo Calling Verification Script...
Echo ===============================================================================
If Exist "%~dp0verify_deploy.bat" (
Call "%~dp0verify_deploy.bat" %TARGET_DRIVE%:
) Else (
Echo [WARN] verify_deploy.bat not found in %~dp0. Skipping automatic verification.
Pause
)
Exit /B 0
---
2. create_uefi.bat (EFI & Fallback Provisioner)
Code:
@echo off
setlocal EnableDelayedExpansion
set "PATH=%SystemRoot%\System32;%SystemRoot%;%PATH%"
title UEFI Bootloader and NVRAM Fallback Provisioner
echo ============================================================
echo UEFI Bootloader and NVRAM Fallback Provisioner
echo ============================================================
echo.
set "TARGET_WIN=%~1"
if "%TARGET_WIN%"=="" (
echo Available Drives with a Windows directory:
for %%D in (C D E F G H I J K L M N O P Q R S T U V W Y Z) do (
if exist "%%D:\Windows\System32\ntoskrnl.exe" (
echo - %%D:\Windows
)
)
echo.
set /p "TARGET_WIN=Enter Target Windows Drive Letter [e.g. K:]: "
)
if "%TARGET_WIN%"=="" (
echo [ERROR] No target drive specified.
goto :FAIL
)
set "TARGET_WIN=%TARGET_WIN:~0,1%:"
if not exist "%TARGET_WIN%\Windows\System32\ntoskrnl.exe" (
echo [ERROR] No valid Windows installation found on %TARGET_WIN%.
goto :FAIL
)
echo [OK] Verified target Windows on %TARGET_WIN%.
echo.
set "ESP_LTR=S"
set "TMP_DP_PROBE=%TEMP%\dp_probe_%RANDOM%.txt"
set "TMP_DP_OUT=%TEMP%\dp_out_%RANDOM%.txt"
echo [*] Scanning disks for FAT32 EFI partitions...
(
echo list disk
echo list volume
) > "%TMP_DP_PROBE%"
diskpart /s "%TMP_DP_PROBE%" > "%TMP_DP_OUT%" 2>&1
del /f /q "%TMP_DP_PROBE%" >nul 2>&1
set "TMP_DP_MAP=%TEMP%\dp_map_%RANDOM%.txt"
set "TMP_DP_MAP_OUT=%TEMP%\dp_mapout_%RANDOM%.txt"
> "%TMP_DP_MAP%" (
for /f "tokens=1,2" %%A in ('type "%TMP_DP_OUT%"') do (
if /i "%%A"=="Disk" (
set "CHK_NUM=%%B"
for /f "delims=0123456789" %%Z in ("!CHK_NUM!") do set "CHK_NUM="
if defined CHK_NUM (
echo select disk %%B
echo detail disk
)
)
)
)
diskpart /s "%TMP_DP_MAP%" > "%TMP_DP_MAP_OUT%" 2>&1
del /f /q "%TMP_DP_MAP%" >nul 2>&1
set "CURR_DSK="
for /f "tokens=1,2,3*" %%A in ('type "%TMP_DP_MAP_OUT%"') do (
if /i "%%A"=="Disk" if not "%%B"=="" (
set "CHK_NUM=%%B"
for /f "delims=0123456789" %%Z in ("!CHK_NUM!") do set "CHK_NUM="
if defined CHK_NUM set "CURR_DSK=%%B"
)
if /i "%%A"=="Volume" (
set "VOL_DISK_%%B=!CURR_DSK!"
)
)
del /f /q "%TMP_DP_MAP_OUT%" >nul 2>&1
echo.
echo ===============================================================================
echo Potential FAT32 EFI Partitions:
echo ===============================================================================
echo Disk # Volume ### Ltr Label Fs Type Size Status
echo ------- ---------- --- ----------- ----- ---------- ------- ---------
for /f "tokens=1,2,3,4,5,6,7,8*" %%A in ('type "%TMP_DP_OUT%"') do (
if /i "%%A"=="Volume" (
set "IS_FAT="
if /i "%%D"=="FAT32" set "IS_FAT=1"
if /i "%%E"=="FAT32" set "IS_FAT=1"
if /i "%%F"=="FAT32" set "IS_FAT=1"
if defined IS_FAT (
set "V_NUM=%%B"
set "D_NUM=!VOL_DISK_%%B!"
if not defined D_NUM set "D_NUM=?"
echo Disk !D_NUM! %%A %%B %%C %%D %%E %%F %%G %%H
)
)
)
echo ===============================================================================
del /f /q "%TMP_DP_OUT%" >nul 2>&1
echo.
set "ESP_VOL="
set /p "ESP_VOL=Enter FAT32 EFI Volume Number to provision: "
if "%ESP_VOL%"=="" (
echo [ERROR] No volume number entered.
goto :FAIL
)
echo [OK] Target EFI Volume selected: %ESP_VOL%
echo.
echo [*] Mounting Volume %ESP_VOL% to %ESP_LTR%:...
(echo select volume %ESP_VOL% & echo assign letter=%ESP_LTR% noerr) | diskpart >nul 2>&1
ping -n 3 127.0.0.1 >nul 2>&1
vol %ESP_LTR%: >nul 2>&1
if errorlevel 1 (
echo [ERROR] Failed to mount Volume %ESP_VOL% to %ESP_LTR%:.
goto :FAIL
)
echo [OK] EFI Partition mounted on %ESP_LTR%:.
echo.
echo [*] Running bcdboot to populate UEFI boot files...
bcdboot %TARGET_WIN%\Windows /s %ESP_LTR%: /f UEFI /p
if errorlevel 1 (
echo [ERROR] bcdboot execution failed.
goto :CLEANUP
)
echo [OK] Boot files successfully created.
echo [*] Provisioning default UEFI fallback bootloader...
if not exist "%ESP_LTR%:\EFI\Boot" mkdir "%ESP_LTR%:\EFI\Boot"
if exist "%ESP_LTR%:\EFI\Microsoft\Boot\bootmgfw.efi" (
copy /y "%ESP_LTR%:\EFI\Microsoft\Boot\bootmgfw.efi" "%ESP_LTR%:\EFI\Boot\bootx64.efi" >nul
echo [OK] Created %ESP_LTR%:\EFI\Boot\bootx64.efi
) else (
echo [WARN] bootmgfw.efi not found to duplicate.
)
echo.
echo [*] Checking NVRAM access...
wmic /namespace:\\root\wmi path MS_SystemInformation get SystemBiosMajorVersion >nul 2>&1
if errorlevel 1 (
echo [INFO] NVRAM write access restricted in current environment.
echo [INFO] Relying on fallback loader bootx64.efi.
) else (
echo [*] UEFI mode active. Synchronizing NVRAM table...
bcdedit /store "%ESP_LTR%:\EFI\Microsoft\Boot\BCD" /set {bootmgr} description "Windows Boot Manager" >nul 2>&1
echo [OK] Motherboard NVRAM entry synced.
)
echo.
:CLEANUP
echo [*] Unmounting %ESP_LTR%:...
cd /d "%TEMP%"
(echo select volume %ESP_LTR% & echo remove letter=%ESP_LTR% noerr) | diskpart >nul 2>&1
echo [OK] %ESP_LTR%: unmounted cleanly.
echo.
echo ============================================================
echo [SUCCESS] UEFI Bootloader Provisioning Complete.
echo ============================================================
echo.
pause
goto :END
:FAIL
echo.
echo ============================================================
echo [FAIL] Execution aborted or encountered errors.
echo ============================================================
echo.
pause
exit /b 1
:END
exit /b 0
---
3. verify_deploy.bat (Universal Verification Suite)
Code:
@echo off
setlocal EnableDelayedExpansion
set "PATH=%SystemRoot%\System32;%SystemRoot%;%PATH%"
title Universal Deployment Verification Utility (UEFI / MBR)
echo ============================================================
echo Universal Deployment Verification Utility (UEFI / MBR)
echo ============================================================
echo.
set "DEFAULT_DRV=%~1"
if "%DEFAULT_DRV%"=="" set "DEFAULT_DRV=%SystemDrive%"
if "%DEFAULT_DRV%"=="" set "DEFAULT_DRV=C:"
echo Available Drives with a Windows directory:
for %%D in (C D E F G H I J K L M N O P Q R S T U V W Y Z) do (
if exist "%%D:\Windows\System32\ntoskrnl.exe" (
echo - %%D:\Windows
)
)
echo.
set /p "TGT_WIN=Enter Target Windows Drive Letter [default: %DEFAULT_DRV%]: "
if "%TGT_WIN%"=="" set "TGT_WIN=%DEFAULT_DRV%"
set "TGT_WIN=%TGT_WIN:~0,1%:"
echo Target selected: %TGT_WIN%\
echo.
echo [*] Verifying Windows System Files on %TGT_WIN%\...
set "CORE_FAIL=0"
for %%F in (ntoskrnl.exe winresume.efi winload.efi winload.exe) do (
if exist "%TGT_WIN%\Windows\System32\%%F" (
echo [PASS] Found: %%F
)
)
for %%H in (SYSTEM SOFTWARE) do (
if exist "%TGT_WIN%\Windows\System32\config\%%H" (
echo [PASS] Found: Registry Hive %%H
) else (
echo [FAIL] Missing: Registry Hive %%H
set "CORE_FAIL=1"
)
)
if "%CORE_FAIL%"=="1" (
echo [ERROR] Core Windows registry files are missing on %TGT_WIN%.
goto :CLEANUP_EXIT
)
echo [RESULT] Core Windows system files successfully verified.
echo.
echo ============================================================
echo Select Boot Mode to Verify:
echo ============================================================
echo [1] UEFI (GPT - ESP FAT32 partition and EFI BCD Store)
echo [2] MBR (Legacy BIOS - bootmgr and Active partition)
set /p "BOOT_MODE=Enter choice [1 or 2, default: 1]: "
if "%BOOT_MODE%"=="" set "BOOT_MODE=1"
echo.
if "%BOOT_MODE%"=="1" goto :VERIFY_UEFI
if "%BOOT_MODE%"=="2" goto :VERIFY_MBR
goto :CLEANUP_EXIT
:VERIFY_UEFI
echo ============================================================
echo Verifying UEFI Bootloader Configuration
echo ============================================================
set "S_DRV=S:"
set "AUTO_MOUNTED=0"
if exist "%S_DRV%\EFI\Microsoft\Boot\BCD" (
echo [*] EFI Partition already accessible on %S_DRV%
goto :RUN_UEFI_CHECKS
)
echo [*] Locating EFI System Partition...
set "TMP_DP_LST=%TEMP%\dp_lst_%RANDOM%.txt"
set "TMP_DP_RES=%TEMP%\dp_res_%RANDOM%.txt"
echo list volume > "!TMP_DP_LST!"
diskpart /s "!TMP_DP_LST!" > "!TMP_DP_RES!" 2>&1
del /f /q "!TMP_DP_LST!" >nul 2>&1
set "ESP_VOL="
for /f "tokens=1,2,3,4,5,6,7*" %%A in ('type "!TMP_DP_RES!"') do (
if /i "%%A"=="Volume" (
set "IS_FAT="
if /i "%%D"=="FAT32" set "IS_FAT=1"
if /i "%%E"=="FAT32" set "IS_FAT=1"
if /i "%%F"=="FAT32" set "IS_FAT=1"
if defined IS_FAT (
set "IS_REM=0"
if /i "%%E"=="Removable" set "IS_REM=1"
if /i "%%F"=="Removable" set "IS_REM=1"
if /i "%%G"=="Removable" set "IS_REM=1"
if "!IS_REM!"=="0" if not defined ESP_VOL (
set "RAW_V=%%B"
set "ESP_VOL=!RAW_V: =!"
)
)
)
)
del /f /q "!TMP_DP_RES!" >nul 2>&1
if not defined ESP_VOL (
echo [!] Could not auto-detect EFI partition volume.
set /p "ESP_VOL=Enter FAT32 EFI Volume Number to verify: "
)
if not defined ESP_VOL (
echo [FAIL] No volume selected.
goto :CLEANUP_EXIT
)
echo [*] Mounting Volume !ESP_VOL! to S:...
set "TMP_DP_MNT=%TEMP%\dp_mnt_%RANDOM%.txt"
echo select volume !ESP_VOL!> "!TMP_DP_MNT!"
echo assign letter=S>> "!TMP_DP_MNT!"
diskpart /s "!TMP_DP_MNT!" >nul 2>&1
del /f /q "!TMP_DP_MNT!" >nul 2>&1
set "AUTO_MOUNTED=1"
ping -n 3 127.0.0.1 >nul 2>&1
:RUN_UEFI_CHECKS
set "MOUNTED_OK="
if exist "%S_DRV%\" set "MOUNTED_OK=1"
if exist "%S_DRV%\EFI" set "MOUNTED_OK=1"
if exist "%S_DRV%\EFI\Microsoft\Boot\BCD" set "MOUNTED_OK=1"
if not defined MOUNTED_OK (
vol %S_DRV% >nul 2>&1 && set "MOUNTED_OK=1"
)
if not defined MOUNTED_OK (
echo [FAIL] EFI partition is not accessible on %S_DRV%.
goto :CLEANUP_EXIT
)
if exist "%S_DRV%\EFI\Microsoft\Boot\bootmgfw.efi" (
echo [PASS] EFI bootloader found: %S_DRV%\EFI\Microsoft\Boot\bootmgfw.efi
) else (
echo [FAIL] EFI bootloader missing: %S_DRV%\EFI\Microsoft\Boot\bootmgfw.efi
)
if exist "%S_DRV%\EFI\Boot\bootx64.efi" (
echo [PASS] Fallback bootloader found: %S_DRV%\EFI\Boot\bootx64.efi
) else (
echo [WARN] Fallback bootloader missing: %S_DRV%\EFI\Boot\bootx64.efi
)
if exist "%S_DRV%\EFI\Microsoft\Boot\BCD" (
echo [PASS] UEFI BCD Store verified.
echo.
echo [*] Registered Boot Loaders:
for /f "tokens=1,2*" %%A in ('bcdedit /store "%S_DRV%\EFI\Microsoft\Boot\BCD" /enum osloader') do (
if /i "%%A"=="identifier" echo %%A %%B
if /i "%%A"=="device" echo %%A %%B
if /i "%%A"=="path" echo %%A %%B
if /i "%%A"=="osdevice" echo %%A %%B
)
) else (
echo [FAIL] UEFI BCD Store missing at %S_DRV%\EFI\Microsoft\Boot\BCD
)
if "%AUTO_MOUNTED%"=="1" (
cd /d "%TEMP%"
set "TMP_DP_UNM=%TEMP%\dp_unm_%RANDOM%.txt"
echo select volume S> "!TMP_DP_UNM!"
echo remove letter=S noerr>> "!TMP_DP_UNM!"
diskpart /s "!TMP_DP_UNM!" >nul 2>&1
del /f /q "!TMP_DP_UNM!" >nul 2>&1
echo [PASS] Unmounted S: cleanly.
)
goto :CLEANUP_EXIT
:VERIFY_MBR
echo ============================================================
echo Verifying MBR Bootloader Configuration
echo ============================================================
set "MBR_TARGET="
set "MBR_AUTO_MOUNTED=0"
for %%D in (S C D %TGT_WIN:~0,1%) do (
if exist "%%D:\bootmgr" (
if exist "%%D:\Boot\BCD" (
set "MBR_TARGET=%%D:"
goto :RUN_MBR_CHECKS
)
)
)
echo [*] Searching for unlettered System Reserved partition...
set "SYS_RES_VOL="
set "TMP_DP_LST=%TEMP%\dp_lst_%RANDOM%.txt"
set "TMP_DP_RES=%TEMP%\dp_res_%RANDOM%.txt"
echo list volume > "!TMP_DP_LST!"
diskpart /s "!TMP_DP_LST!" > "!TMP_DP_RES!" 2>&1
del /f /q "!TMP_DP_LST!" >nul 2>&1
for /f "tokens=1,2,3,4,5,6,7*" %%A in ('type "!TMP_DP_RES!"') do (
if /i "%%A"=="Volume" (
set "IS_NTFS="
if /i "%%D"=="NTFS" set "IS_NTFS=1"
if /i "%%E"=="NTFS" set "IS_NTFS=1"
if /i "%%F"=="NTFS" set "IS_NTFS=1"
set "IS_SYS="
if /i "%%C"=="System" set "IS_SYS=1"
if /i "%%D"=="System" set "IS_SYS=1"
if /i "%%C"=="System Rese" set "IS_SYS=1"
if defined IS_NTFS if defined IS_SYS (
if not defined SYS_RES_VOL (
set "RAW_SV=%%B"
set "SYS_RES_VOL=!RAW_SV: =!"
)
)
)
)
del /f /q "!TMP_DP_RES!" >nul 2>&1
if not defined SYS_RES_VOL (
echo [WARN] Could not find partition labeled "System Reserved".
goto :RUN_MBR_CHECKS
)
echo [*] Found System Reserved as Volume !SYS_RES_VOL!. Mounting to S:...
set "TMP_DP_MNT=%TEMP%\dp_mnt_%RANDOM%.txt"
echo select volume !SYS_RES_VOL!> "!TMP_DP_MNT!"
echo assign letter=S>> "!TMP_DP_MNT!"
diskpart /s "!TMP_DP_MNT!" >nul 2>&1
del /f /q "!TMP_DP_MNT!" >nul 2>&1
ping -n 3 127.0.0.1 >nul 2>&1
set "MBR_MOUNTED_OK="
if exist "S:\" set "MBR_MOUNTED_OK=1"
if not defined MBR_MOUNTED_OK (
vol S: >nul 2>&1 && set "MBR_MOUNTED_OK=1"
)
if not defined MBR_MOUNTED_OK (
echo [FAIL] Failed to assign S: to Volume !SYS_RES_VOL!.
) else (
set "MBR_TARGET=S:"
set "MBR_AUTO_MOUNTED=1"
echo [PASS] Successfully mounted Volume !SYS_RES_VOL! to S:.
)
:RUN_MBR_CHECKS
if not defined MBR_TARGET set "MBR_TARGET=%TGT_WIN%"
echo.
echo Target boot volume being verified: %MBR_TARGET%\
if exist "%MBR_TARGET%\bootmgr" (
echo [PASS] Found bootmgr at %MBR_TARGET%\bootmgr
) else (
echo [FAIL] Missing bootmgr at %MBR_TARGET%\bootmgr
)
if exist "%MBR_TARGET%\Boot\BCD" (
echo [PASS] MBR BCD Store verified at %MBR_TARGET%\Boot\BCD
echo.
echo [*] Registered Boot Loaders:
for /f "tokens=1,2*" %%A in ('bcdedit /store "%MBR_TARGET%\Boot\BCD" /enum osloader') do (
if /i "%%A"=="identifier" echo %%A %%B
if /i "%%A"=="device" echo %%A %%B
if /i "%%A"=="path" echo %%A %%B
if /i "%%A"=="osdevice" echo %%A %%B
)
) else (
echo [FAIL] MBR BCD Store missing at %MBR_TARGET%\Boot\BCD
)
cd /d "%TEMP%"
if "%MBR_AUTO_MOUNTED%"=="1" (
echo.
echo [*] Unmounting temporary drive S:...
set "TMP_DP_UNM=%TEMP%\dp_unm_%RANDOM%.txt"
echo select volume S> "!TMP_DP_UNM!"
echo remove letter=S noerr>> "!TMP_DP_UNM!"
diskpart /s "!TMP_DP_UNM!" >nul 2>&1
del /f /q "!TMP_DP_UNM!" >nul 2>&1
echo [PASS] Unmounted S: cleanly.
)
:CLEANUP_EXIT
echo.
echo ============================================================
echo Verification Complete.
echo ============================================================
echo.
pause
exit /b 0
PROCEDURE TO USE BATCH FILES
Code:
1. Place all three batch files,attached below, deploy_win11.bat, create_uefi.bat, verify_deploy.bat in the same folder like "BATCH FILES" or in the root drive of Windows 11 boot disk(FAT32/NTFS X: AND/OR Y:)(See the complete procedure of making Windows 11 v26H2 boot media at the end of this text file, below) You can copy the code of these file and paste them in Notepad to save as ALL FILES>ANSI. Copy the code of deploy_win11.bat and paste it in Notepad. Click All Files , select ANSI and save as "deploy_win11.bat". Same for create_uefi.bat and veriry_deploy.bat
2. Boot from Windows 11 boot disk. At country/region selection screen, press Shift+F10.
3. X:\sources>diskpart
DISKPART>list volume
OR RUN ANY ONE OF FOLOWING COMMANDS TO FIND DRIVE LETTER OF WINDOWS 11 BOOT MEDIA(FAT32/NTFS)
{X:\sources>for %i in (c D E F G H I J K L M N O P Q R S T U V W X Y Z)do @if exist %i:\sources\install.wim echo Found at %i
Found at J
X:\sources>for %i in (c D E F G H I J K L M N O P Q R S T U V W X Y Z)do @if exist %i:\sources\boot.wim echo Found at %i
Found at F
X:\sources>for %i in (c D E F G H I J K L M N O P Q R S T U V W X Y Z)do @if exist %i:\sources\install.esd echo Found at %i
Found at K
4. Note the drive letter of boot disk. In my case it is J: And type exit to leave diskpart.
5. X:\sources>J:
6: J:>cd BATCH FILES
7. J:\BATCH FILES>deploy_win11.bat
{ OR J:>deploy_win11.bat if all three are in root drive of Windows 11 boot media.}
{After image applied , other two batch files are called automatically.}
{deploy_win11.bat , create_uefi.bat, verify_deploy.bat can be run independently within live os. User can run any
batch file from live os.This is helpful to check/repair efi, system reserved partition or windows core files.
8. User has to input index number, drive letter,disk number following corresponding commands.
9. User can install Windows 11 v26H2 in MBR (or GPT) in disk 0.Also user can install Windows 11 v26H2 in disk 1 in GPT(or MBR) parition style. If Disk 0 has MBR installation and Disk 1 has GPT installation user has to select disk o or disk 1 as boot option 1. Disk 0 or Disk 1 can be selected as boot option 1.
10.User can install more than one Windows 11 on Disk 0 or Disk 1. In such case select option "No Wipe" for dual or multi installations.
11.Please backup your data on pc/laptop before applying these files.
12.Procedure to make Windows 11 boot media :-
Download Windows 11 v26H2 iso from Microsoft website. Mount it to virtual drive.
Attach pen/usb drive 32 GB .Run CMD as administrator.
C:\Windows\system32>diskpart
DISKPART> list volume
DISKPART> select disk #(correct drive number of blank usb drive 1,2,3 in your pc/laptop.)
DISKPART>clean
DISKPART>convert mbr
DISKPART>create partition primary size=2048
DISKPART>create partition primary
DISKPART>select partition 1
DISKPART>format fs=FAT32 label="BOOT"
DISKPART>assign letter=X
DISKPART>active
DISKPART>select partition 2
DISKPART>format fs=NTFS label="INSTALL"
DISKPART>assign letter=Y
DISKPART>exit
13.From contents of mounted iso of Windows 11, copy all files and folders to Y: Select all files and folders, excluding 'sources' folder from mounted iso and paste them in X: Make a folder named "sources" in X: From Y: cut file "boot.wim" and paste it into X:\sources. Three batch files deploy_win11.bat, create_uefi.bat, verify_deploy.bat can be place in X:\BATCH FILES or Y:\BATCH FILES. Or simply in X: or Y: Done.
14 . Copy deploy_win11.bat, create_uefi.bat, verify_deploy.bat to same folder {BATCH FILES} or root drive of Windows 11 boot media{ X: OR Y:}
15. After running diskpart>list volume, we know drive letter. If it is J then
X:\sources>J:
J:>cd BATCH FILES
J:\BATCH FILES>deploy_win11.bat
OR J:>deploy_win11.bat {if deploy_win11.bat, create_uefi.bat, and verify_deploy.bat are placed in root drive (X: or Y: while in live os)
MBR WORKFLOW
Code:
===============================================================================
Applying Image
===============================================================================
Source WIM : G:\sources\install.wim
Selected Index: 1
Target Drive : I:\
===============================================================================
Extracting Windows files... [This may take several minutes]
Deployment Image Servicing and Management tool
Version: 10.0.26100.8972
Applying image
[==========================100.0%==========================]
The operation completed successfully.
[PASS] Image applied successfully to I:\.
[*] Updating existing bootloader on S:...
Boot files successfully created.
[PASS] Appended new OS entry to existing BCD on S:.
[*] Checking BCD for dynamic locate pointers...
[PASS] BCD validation completed.
===============================================================================
Deployment Process Complete.
Calling Verification Script...
===============================================================================
============================================================
Universal Deployment Verification Utility (UEFI / MBR)
============================================================
Available Drives with a Windows directory:
- C:\Windows
- D:\Windows
- E:\Windows
Enter Target Windows Drive Letter [default: C:]: C
Target selected: C:\
[*] Verifying Windows System Files on C:\...
[PASS] Found: ntoskrnl.exe
[PASS] Found: winresume.efi
[PASS] Found: winload.efi
[PASS] Found: winload.exe
[PASS] Found: Registry Hive SYSTEM
[PASS] Found: Registry Hive SOFTWARE
[RESULT] Core Windows system files successfully verified.
============================================================
Select Boot Mode to Verify:
============================================================
[1] UEFI (GPT - ESP FAT32 partition and EFI BCD Store)
[2] MBR (Legacy BIOS - bootmgr and Active partition)
Enter choice [1 or 2, default: 1]: 2
============================================================
Verifying MBR Bootloader Configuration
============================================================
[*] Searching for unlettered System Reserved partition...
[*] Found System Reserved as Volume 1. Mounting to S:...
[PASS] Successfully mounted Volume 1 to S:.
Target boot volume being verified: S:\
[PASS] Found bootmgr at S:\bootmgr
[PASS] MBR BCD Store verified at S:\Boot\BCD
[*] Registered Boot Loaders:
identifier {0cea54fa-cac7-11f1-90ba-aad710e4b29a}
device partition=C:
path \Windows\system32\winload.exe
osdevice partition=C:
identifier {default}
device partition=I:
path \Windows\system32\winload.exe
osdevice partition=I:
identifier {f32cbfc2-cac0-11f1-9298-ee870943cf00}
device ramdisk=[C:]\Recovery\WindowsRE\Winre.wim,{f32cbfc3-cac0-11f1-9298-ee870943cf00}
path \windows\system32\winload.exe
osdevice ramdisk=[C:]\Recovery\WindowsRE\Winre.wim,{f32cbfc3-cac0-11f1-9298-ee870943cf00}
[*] Unmounting temporary drive S:...
[PASS] Unmounted S: cleanly.
============================================================
Verification Complete.
============================================================
Press any key to continue . . .
===============================================================================
Applying Image
===============================================================================
Source WIM : J:\sources\install.wim
Selected Index: 6
Target Drive : G:\
===============================================================================
Extracting Windows files... [This may take several minutes]
Deployment Image Servicing and Management tool
Version: 10.0.26100.8972
Applying image
[==========================100.0%==========================]
The operation completed successfully.
[PASS] Image applied successfully to G:\.
[*] Updating existing bootloader on S:...
Boot files successfully created.
[PASS] Appended new OS entry to existing BCD on S:.
[*] Checking BCD for dynamic locate pointers...
[PASS] BCD validation completed.
===============================================================================
Deployment Process Complete.
Calling Verification Script...
===============================================================================
============================================================
Universal Deployment Verification Utility (UEFI / MBR)
============================================================
Available Drives with a Windows directory:
- D:\Windows
- E:\Windows
- G:\Windows
- H:\Windows
Enter Target Windows Drive Letter [default: X:]: G
Target selected: G:\
[*] Verifying Windows System Files on G:\...
[PASS] Found: ntoskrnl.exe
[PASS] Found: winresume.efi
[PASS] Found: winload.efi
[PASS] Found: winload.exe
[PASS] Found: Registry Hive SYSTEM
[PASS] Found: Registry Hive SOFTWARE
[RESULT] Core Windows system files successfully verified.
============================================================
Select Boot Mode to Verify:
============================================================
[1] UEFI (GPT - ESP FAT32 partition and EFI BCD Store)
[2] MBR (Legacy BIOS - bootmgr and Active partition)
Enter choice [1 or 2, default: 1]: 2
============================================================
Verifying MBR Bootloader Configuration
============================================================
[*] Searching for unlettered System Reserved partition...
[*] Found System Reserved as Volume 1. Mounting to S:...
[PASS] Successfully mounted Volume 1 to S:.
Target boot volume being verified: S:\
[PASS] Found bootmgr at S:\bootmgr
[PASS] MBR BCD Store verified at S:\Boot\BCD
[*] Registered Boot Loaders:
identifier {0cea54fa-cac7-11f1-90ba-aad710e4b29a}
device partition=H:
path \Windows\system32\winload.exe
osdevice partition=H:
identifier {default}
device partition=G:
path \Windows\system32\winload.exe
osdevice partition=G:
identifier {671bacc5-cb7e-11f1-b4f1-9014f5bfc0a3}
device ramdisk=[I:]\Recovery\WindowsRE\Winre.wim,{671bacc6-cb7e-11f1-b4f1-9014f5bfc0a3}
path \windows\system32\winload.exe
osdevice ramdisk=[I:]\Recovery\WindowsRE\Winre.wim,{671bacc6-cb7e-11f1-b4f1-9014f5bfc0a3}
identifier {e7273918-cb12-11f1-929a-00e04f0fa4d0}
device partition=I:
path \Windows\system32\winload.exe
osdevice partition=I:
identifier {f32cbfc2-cac0-11f1-9298-ee870943cf00}
device ramdisk=[H:]\Recovery\WindowsRE\Winre.wim,{f32cbfc3-cac0-11f1-9298-ee870943cf00}
path \windows\system32\winload.exe
osdevice ramdisk=[H:]\Recovery\WindowsRE\Winre.wim,{f32cbfc3-cac0-11f1-9298-ee870943cf00}
[*] Unmounting temporary drive S:...
[PASS] Unmounted S: cleanly.
============================================================
Verification Complete.
============================================================
Press any key to continue . . .
GPT WORKFLOW
Code:
X:\sources>DISKPART
Microsoft DiskPart version 10.0.26100.1150
Copyright (C) Microsoft Corporation.
On computer: MININT-H4VLA33
DISKPART> LIST VOLUME
Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----------- ----- ---------- ------- --------- --------
Volume 0 K DVD-ROM 0 B No Media
Volume 1 C System Rese NTFS Partition 500 MB Healthy
Volume 2 H Windows NTFS Partition 247 GB Healthy
Volume 3 I TEST 1 NTFS Partition 296 GB Healthy
Volume 4 G TEST 2 NTFS Partition 387 GB Healthy
Volume 5 D Windows NTFS Partition 59 GB Healthy
Volume 6 E Windows Hom NTFS Partition 59 GB Healthy
Volume 7 SYSTEM FAT32 Partition 260 MB Healthy Hidden
Volume 8 F BOOT FAT32 Removable 2048 MB Healthy
Volume 9 J INSTALL NTFS Removable 27 GB Healthy
DISKPART> exit
Leaving DiskPart...
X:\sources>J:
J:\>cd BATCH FILES
J:\BATCH FILES>DIR
Volume in drive J is INSTALL
Volume Serial Number is 6EAD-EC96
Directory of J:\BATCH FILES
10/19/2026 08:58 AM <DIR> .
10/19/2026 07:40 AM 7,439 create_uefi.bat
10/17/2026 11:43 PM 15,323 deploy_win11.bat
10/19/2026 07:44 AM 33,102 ElevenForum_Post_Template.txt
10/19/2026 08:51 AM 55,076,370 Fix Windows 11 BCDedit.pdf
10/19/2026 08:54 AM 96 New Text Document.txt
10/19/2026 07:41 AM 10,827 verify_deploy.bat
6 File(s) 55,143,157 bytes
1 Dir(s) 11,609,669,632 bytes free
J:\BATCH FILES> deploy_win11.bat
===============================================================================
Available Editions in J:\sources\install.wim:
===============================================================================
Deployment Image Servicing and Management tool
Version: 10.0.26100.8972
Details for image : J:\sources\install.wim
Index : 1
Name : Windows 11 Home
Description : Windows 11 Home
Size : 25,730,139,683 bytes
Index : 2
Name : Windows 11 Home N
Description : Windows 11 Home N
Size : 25,002,017,930 bytes
Index : 3
Name : Windows 11 Home Single Language
Description : Windows 11 Home Single Language
Size : 25,726,661,488 bytes
Index : 4
Name : Windows 11 Education
Description : Windows 11 Education
Size : 26,767,384,556 bytes
Index : 5
Name : Windows 11 Education N
Description : Windows 11 Education N
Size : 26,016,541,654 bytes
Index : 6
Name : Windows 11 Pro
Description : Windows 11 Pro
Size : 26,770,709,765 bytes
Index : 7
Name : Windows 11 Pro N
Description : Windows 11 Pro N
Size : 26,037,976,877 bytes
Index : 8
Name : Windows 11 Pro Education
Description : Windows 11 Pro Education
Size : 26,767,435,194 bytes
Index : 9
Name : Windows 11 Pro Education N
Description : Windows 11 Pro Education N
Size : 26,016,567,423 bytes
Index : 10
Name : Windows 11 Pro for Workstations
Description : Windows 11 Pro for Workstations
Size : 26,767,485,832 bytes
Index : 11
Name : Windows 11 Pro N for Workstations
Description : Windows 11 Pro N for Workstations
Size : 26,016,593,192 bytes
The operation completed successfully.
===============================================================================
Enter the Index number to install [default: 1]: 6
===============================================================================
Disk Configuration:
===============================================================================
[1] Use an existing partition [no wipe]
[2] Wipe an entire disk and create MBR [System Reserved + OS]
[3] Wipe an entire disk and create GPT [EFI + MSR + OS]
===============================================================================
Enter choice [1, 2, or 3, default: 1]: 3
Microsoft DiskPart version 10.0.26100.1150
Copyright (C) Microsoft Corporation.
On computer: MININT-H4VLA33
DISKPART>
Disk ### Status Size Free Dyn Gpt
-------- ------------- ------- ------- --- ---
Disk 0 Online 931 GB 1024 KB
Disk 1 Online 119 GB 1024 KB *
Disk 2 Online 29 GB 0 B
DISKPART>
Enter the DISK NUMBER to completely wipe and format as GPT: 1
===============================================================================
Applying Image
===============================================================================
Source WIM : J:\sources\install.wim
Selected Index: 6
Target Drive : W:\
===============================================================================
Extracting Windows files... [This may take several minutes]
Deployment Image Servicing and Management tool
Version: 10.0.26100.8972
Applying image
[==========================100.0%==========================]
The operation completed successfully.
[PASS] Image applied successfully to W:\.
===============================================================================
Configuring UEFI Bootloader and NVRAM
===============================================================================
Launching create_uefi.bat for target W: ...
============================================================
UEFI Bootloader and NVRAM Fallback Provisioner
============================================================
[OK] Verified target Windows on W:.
[*] Scanning disks for FAT32 EFI partitions...
===============================================================================
Potential FAT32 EFI Partitions:
===============================================================================
Disk # Volume ### Ltr Label Fs Type Size Status
------- ---------- --- ----------- ----- ---------- ------- ---------
Disk 1 Volume 6 S SYSTEM FAT32 Partition 260 MB
Disk 2 Volume 7 F BOOT FAT32 Removable 2048 MB
===============================================================================
Enter FAT32 EFI Volume Number to provision:6
[OK] Target EFI Volume selected: 6
[*] Mounting Volume 6 to S:...
[OK] EFI Partition mounted on S:.
[*] Running bcdboot to populate UEFI boot files...
BFSVC Error: AddBootmgrLast and PreserveBootOrder options are ignored when custom volume is specified
BFSVC Error: AddBootmgrLast and PreserveBootOrder options are ignored when custom volume is specified
Boot files successfully created.
[OK] Boot files successfully created.
[*] Provisioning default UEFI fallback bootloader...
[OK] Created S:\EFI\Boot\bootx64.efi
[*] Checking NVRAM access...
[INFO] NVRAM write access restricted in current environment.
[INFO] Relying on fallback loader bootx64.efi.
[*] Unmounting S:...
[OK] S: unmounted cleanly.
============================================================
[SUCCESS] UEFI Bootloader Provisioning Complete.
============================================================
Press any key to continue . . .
Press any key to continue . . .
[*] Checking BCD for dynamic locate pointers...
[PASS] BCD validation completed.
===============================================================================
Deployment Process Complete.
Calling Verification Script...
===============================================================================
============================================================
Universal Deployment Verification Utility (UEFI / MBR)
============================================================
Available Drives with a Windows directory:
- G:\Windows
- H:\Windows
- I:\Windows
- W:\Windows
Enter Target Windows Drive Letter [default: W:]: W
Target selected: W:\
[*] Verifying Windows System Files on W:\...
[PASS] Found: ntoskrnl.exe
[PASS] Found: winresume.efi
[PASS] Found: winload.efi
[PASS] Found: winload.exe
[PASS] Found: Registry Hive SYSTEM
[PASS] Found: Registry Hive SOFTWARE
[RESULT] Core Windows system files successfully verified.
============================================================
Select Boot Mode to Verify:
============================================================
[1] UEFI (GPT - ESP FAT32 partition and EFI BCD Store)
[2] MBR (Legacy BIOS - bootmgr and Active partition)
Enter choice [1 or 2, default: 1]: 1
============================================================
Verifying UEFI Bootloader Configuration
============================================================
[*] Locating EFI System Partition...
[*] Mounting Volume 6 to S:...
[PASS] EFI bootloader found: S:\EFI\Microsoft\Boot\bootmgfw.efi
[PASS] Fallback bootloader found: S:\EFI\Boot\bootx64.efi
[PASS] UEFI BCD Store verified.
[*] Registered Boot Loaders:
identifier {default}
device partition=W:
path \Windows\system32\winload.efi
osdevice partition=W:
[PASS] Unmounted S: cleanly.
============================================================
Verification Complete.
============================================================
Press any key to continue . . .
J:\BATCH FILES>
J:\BATCH FILES>deploy_win11.bat
===============================================================================
Available Editions in J:\sources\install.wim:
===============================================================================
Deployment Image Servicing and Management tool
Version: 10.0.26100.8972
Details for image : J:\sources\install.wim
Index : 1
Name : Windows 11 Home
Description : Windows 11 Home
Size : 25,730,139,683 bytes
Index : 2
Name : Windows 11 Home N
Description : Windows 11 Home N
Size : 25,002,017,930 bytes
Index : 3
Name : Windows 11 Home Single Language
Description : Windows 11 Home Single Language
Size : 25,726,661,488 bytes
Index : 4
Name : Windows 11 Education
Description : Windows 11 Education
Size : 26,767,384,556 bytes
Index : 5
Name : Windows 11 Education N
Description : Windows 11 Education N
Size : 26,016,541,654 bytes
Index : 6
Name : Windows 11 Pro
Description : Windows 11 Pro
Size : 26,770,709,765 bytes
Index : 7
Name : Windows 11 Pro N
Description : Windows 11 Pro N
Size : 26,037,976,877 bytes
Index : 8
Name : Windows 11 Pro Education
Description : Windows 11 Pro Education
Size : 26,767,435,194 bytes
Index : 9
Name : Windows 11 Pro Education N
Description : Windows 11 Pro Education N
Size : 26,016,567,423 bytes
Index : 10
Name : Windows 11 Pro for Workstations
Description : Windows 11 Pro for Workstations
Size : 26,767,485,832 bytes
Index : 11
Name : Windows 11 Pro N for Workstations
Description : Windows 11 Pro N for Workstations
Size : 26,016,593,192 bytes
The operation completed successfully.
===============================================================================
Enter the Index number to install [default: 1]: 1
===============================================================================
Disk Configuration:
===============================================================================
[1] Use an existing partition [no wipe]
[2] Wipe an entire disk and create MBR [System Reserved + OS]
[3] Wipe an entire disk and create GPT [EFI + MSR + OS]
===============================================================================
Enter choice [1, 2, or 3, default: 1]:1
===============================================================================
Available Volumes:
===============================================================================
Microsoft DiskPart version 10.0.26100.1150
Copyright (C) Microsoft Corporation.
On computer: MININT-7KCADLV
DISKPART>
Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----------- ----- ---------- ------- --------- --------
Volume 0 K DVD-ROM 0 B No Media
Volume 1 C System Rese NTFS Partition 500 MB Healthy
Volume 2 H Windows NTFS Partition 247 GB Healthy
Volume 3 I TEST 1 NTFS Partition 296 GB Healthy
Volume 4 G TEST 2 NTFS Partition 387 GB Healthy
Volume 5 D Windows NTFS Partition 70 GB Healthy
Volume 6 E Windows Hom NTFS Partition 48 GB Healthy
Volume 7 SYSTEM FAT32 Partition 260 MB Healthy Hidden
Volume 8 F BOOT FAT32 Removable 2048 MB Healthy
Volume 9 J INSTALL NTFS Removable 27 GB Healthy
DISKPART> ===============================================================================
Enter the target drive letter to install to [default: D]: E
===============================================================================
Applying Image
===============================================================================
Source WIM : J:\sources\install.wim
Selected Index: 1
Target Drive : E:\
===============================================================================
Extracting Windows files... [This may take several minutes]
Deployment Image Servicing and Management tool
Version: 10.0.26100.8972
Applying image
[==========================100.0%==========================]
The operation completed successfully.
[PASS] Image applied successfully to E:\.
===============================================================================
Configuring UEFI Bootloader and NVRAM
===============================================================================
Launching create_uefi.bat for target E: ...
============================================================
UEFI Bootloader and NVRAM Fallback Provisioner
============================================================
[OK] Verified target Windows on E:.
[*] Scanning disks for FAT32 EFI partitions...
===============================================================================
Potential FAT32 EFI Partitions:
===============================================================================
Disk # Volume ### Ltr Label Fs Type Size Status
------- ---------- --- ----------- ----- ---------- ------- ---------
Disk 1 Volume 7 SYSTEM FAT32 Partition 260 MB Healthy
Disk 2 Volume 8 F BOOT FAT32 Removable 2048 MB
===============================================================================
Enter FAT32 EFI Volume Number to provision:7
[OK] Target EFI Volume selected: 7
[*] Mounting Volume 7 to S:...
[OK] EFI Partition mounted on S:.
[*] Running bcdboot to populate UEFI boot files...
BFSVC Error: AddBootmgrLast and PreserveBootOrder options are ignored when custom volume is specified
BFSVC Error: AddBootmgrLast and PreserveBootOrder options are ignored when custom volume is specified
Boot files successfully created.
[OK] Boot files successfully created.
[*] Provisioning default UEFI fallback bootloader...
[OK] Created S:\EFI\Boot\bootx64.efi
[*] Checking NVRAM access...
[INFO] NVRAM write access restricted in current environment.
[INFO] Relying on fallback loader bootx64.efi.
[*] Unmounting S:...
[OK] S: unmounted cleanly.
============================================================
[SUCCESS] UEFI Bootloader Provisioning Complete.
============================================================
Press any key to continue . . .
[*] Checking BCD for dynamic locate pointers...
[PASS] BCD validation completed.
===============================================================================
Deployment Process Complete.
Calling Verification Script...
===============================================================================
============================================================
Universal Deployment Verification Utility (UEFI / MBR)
============================================================
Available Drives with a Windows directory:
- D:\Windows
- E:\Windows
- G:\Windows
- H:\Windows
- I:\Windows
Enter Target Windows Drive Letter [default: E:]: E
Target selected: E:\
[*] Verifying Windows System Files on E:\...
[PASS] Found: ntoskrnl.exe
[PASS] Found: winresume.efi
[PASS] Found: winload.efi
[PASS] Found: winload.exe
[PASS] Found: Registry Hive SYSTEM
[PASS] Found: Registry Hive SOFTWARE
[RESULT] Core Windows system files successfully verified.
============================================================
Select Boot Mode to Verify:
============================================================
[1] UEFI (GPT - ESP FAT32 partition and EFI BCD Store)
[2] MBR (Legacy BIOS - bootmgr and Active partition)
Enter choice [1 or 2, default: 1]: 1
============================================================
Verifying UEFI Bootloader Configuration
============================================================
[*] Locating EFI System Partition...
[*] Mounting Volume 7 to S:...
[PASS] EFI bootloader found: S:\EFI\Microsoft\Boot\bootmgfw.efi
[PASS] Fallback bootloader found: S:\EFI\Boot\bootx64.efi
[PASS] UEFI BCD Store verified.
[*] Registered Boot Loaders:
identifier {default}
device partition=E:
path \Windows\system32\winload.efi
osdevice partition=E:
identifier {f170bff0-cc55-11f1-932c-8b58cf23bcec}
device partition=D:
path \Windows\system32\winload.efi
osdevice partition=D:
identifier {f1e54001-cc4e-11f1-a33a-8d8e799bdfc0}
device ramdisk=[D:]\Recovery\WindowsRE\Winre.wim,{f1e54002-cc4e-11f1-a33a-8d8e799bdfc0}
path \windows\system32\winload.efi
osdevice ramdisk=[D:]\Recovery\WindowsRE\Winre.wim,{f1e54002-cc4e-11f1-a33a-8d8e799bdfc0}
[PASS] Unmounted S: cleanly.
============================================================
Verification Complete.
============================================================
Press any key to continue . . .
THANKS FOR READING THIS THREAD AND SHARING YOUR VALUABLE TIME.
- Windows Build/Version
- Windows 11 v26H2 OS BUILD 26300.9457
Attachments
Last edited:
My Computer
At a glance
Window 11 v24H2 Build 26100.2033Intel(R) Core(TM) i3-2100 CPU @ 3.10GHz 3.10 GHz4.00 GB (3.89 GB usable)Onboard
- OS
- Window 11 v24H2 Build 26100.2033
- Computer type
- PC/Desktop
- Manufacturer/Model
- ASSEMMBLED
- CPU
- Intel(R) Core(TM) i3-2100 CPU @ 3.10GHz 3.10 GHz
- Motherboard
- ZEBRONICS
- Memory
- 4.00 GB (3.89 GB usable)
- Graphics Card(s)
- Onboard
- Sound Card
- Onboard
- Monitor(s) Displays
- LG
- Screen Resolution
- 1366x768
- Hard Drives
- Toshiba HDD 1 TB
- Keyboard
- Mechanical
- Mouse
- Mechanical
- Internet Speed
- 700 kb/s
- Browser
- Microsoft EDGE, CHROME
- Antivirus
- Microsoft Defender





