An automated script for MCT created installation media usb to install Windows 11 v25H2 on an unsupported pc hardware.


Ramesh Sharma

Well-known member
Member
Local time
1:50 AM
Posts
280
OS
Window 11 v24H2 Build 26100.2033
Welcome here everyone. Thanks to https://gemini.google.com/ which helped me to create this project without powershell commands.

1. Download media creation tool and prepare installation media usb for Windows 11 v25H2. I am considering .swm file system here. Any bootble usb having install.wim or install.esd can be used here. The purpose is to install Windows 11 v25H2 on an unsupported pc hardware avoiding error message. Please note that other easy methods are available. This is an alternate automated method to install Windows 11 v25H2 on an unsupported pc hardware avoiding error message "This pc can't install Windows 11".

2. We have to work with startnet.cmd and winpeshl.ini files in boot.wim in sources folder of bootable usb created by media creation tool. Sources folder has install.swm and install2.swm files. I am attaching modified startnet.cmd, modified winpeshl.ini and Bypass.cmd in zip file. To view them, right click >show more options>edit. You can select all contents to copy and then paste in mounted directory in right place as told , using commands syntax correctly.

3. Create a file named startnet.cmd in notepad. {Files>All Files and saved as ANSI coding.} Paste following code in this file. It will work as an automated script when booted on MBR and GPT disks installing Windows 11 v2H2 on an unsupported pc hardware. It works perfectly on BIOS and UEFI systems. In addition, it works for install.wim and install.esd files.

@echo off
:: Initialize hardware environment
X:\Windows\System32\wpeinit.exe

:: Give USB drivers a moment to initialize
timeout /t 3 >nul
o
title UNIVERSAL 25H2 DEPLOYER
color 17
echo ===================================================
echo SCANNING ALL DRIVES (Z-C) FOR MEDIA
echo ===================================================

:SEARCH
set "USB="
:: Scan for the Bypass script to identify the USB drive letter
for %%d in (Z Y X W V U T S R Q P O N M L K J I H G F E D C) do (
if exist %%d:\Bypass.cmd set "USB=%%d"
)

if "%USB%"=="" (
echo [!] Searching... please insert USB media.
timeout /t 5 >nul
goto SEARCH
)

:: SUCCESS ALERT: Green background + System Beep
color 2F
echo
echo ===================================================
echo [SUCCESS] FOUND MEDIA ON DRIVE %USB%:
echo ===================================================

:: Inject the hardware bypasses
echo [1/2] Injecting Registry Bypasses...
call %USB%:\Bypass.cmd

:: Detect file format (WIM, SWM, or ESD)
set "EXT=wim"
if exist %USB%:\sources\install.swm set "EXT=swm"
if exist %USB%:\sources\install.esd set "EXT=esd"

:: Launch the Setup Engine
echo [2/2] Launching Windows Setup Engine (.%EXT%)...
cd /d %USB%:\sources
setup.exe /installfrom:%USB%:\sources\install.%EXT%

:: Safety catch to prevent instant reboot on failure
if %errorlevel% neq 0 (
color 4F
echo.
echo [ERROR] Setup exited with code: %errorlevel%
pause
)


Now run CMD as an administrator.

4. C:\Windows\System32>dism /mount-image /imagefile:D:\sources\boot.wim /index:2 /mountdir:C:\mount

Deployment Image Servicing and Management tool
Version: 10.0.28000.4

Mounting image
[==========================100.0%==========================]
The operation completed successfully.

5. C:\Windows\System32>dism /image:C:\mount /set-scratchspace:512

Deployment Image Servicing and Management tool
Version: 10.0.28000.4

Image Version: 10.0.26100.7623

Scratch Space : 512MB

The operation completed successfully.
This is very important step in this project.

6.C:\Windows\System32>notepad C:\mount\Windows\System32\startnet.cmd
Delete original contents in it, if any, and paste above code. Click File and Save. Close opened file explorer.

7. Create winpeshl.ini with following contents in Notepad with ANSI coding , All files types.
[LaunchApp]
AppPath = %SYSTEMROOT%\System32\startnet.cmd

Place this winpeshl.ini in C:\mount\Windows\System32. Remember to create winpeshl.ini if does not exist and replace old contents if exists. Check contents of winpeshl.ini by following command.

C:\Windows\System32>type C:\mount\Windows\System32\winpeshl.ini

Output should be as follow:-
[LaunchApp]
AppPath = %SYSTEMROOT%\System32\startnet.cmd

This is very important step in this project.

8.C:\Windows\System32>dism /unmount-image /mountdir:C:\mount /commit

Deployment Image Servicing and Management tool
Version: 10.0.28000.4

Saving image
[==========================100.0%==========================]
Unmounting image
[==========================100.0%==========================]
The operation completed successfully.

9. Remember to unmount index 2 after closing all opened files, folders/explorer/notepad.

10. Repeat steps 4 to 8 for index 1 also. Follow step 9 for index 1 also.

11. Place Bypass.cmd in root drive of boot disk. Contents of Bypass.cmd are as follow:-

@echo off
:: Use /f to force overwrite and avoid prompts
reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassTPMCheck" /t REG_DWORD /d 1 /f
reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassSecureBootCheck" /t REG_DWORD /d 1 /f
reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassRAMCheck" /t REG_DWORD /d 1 /f
reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassCPUCheck" /t REG_DWORD /d 1 /f
reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassStorageCheck" /t REG_DWORD /d 1 /f
reg add "HKLM\SYSTEM\Setup\MoSetup" /v "AllowUpgradesWithUnsupportedTPMOrCPU" /t REG_DWORD /d 1 /f

echo [DONE] Hardware bypasses applied to registry.

12.Now boot from this modified boot disk . It should install Windows 11 v25H2 on any unsupported pc hardware.

Thank you for reading and sharing your valuable time in this post.
Special thanks to https://gemini.google.com/
Link to my conversation is https://gemini.google.com/app/e221d3dff43c045d
 

Attachments

Last edited:

My Computer 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
What's the point of a script if people have to manually edit files? Most people won't be able to achieve this. Most people would just use the likes of RUFUS
 

My Computers My Computers

  • At a glance

    Windows 11 Enterprise 25H2 26200 7462Intel XEON E5-2699 v364GB Teamgroup UD4-3600NVIDIA GeForce GTX 1080 Ti
    OS
    Windows 11 Enterprise 25H2 26200 7462
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom Build
    CPU
    Intel XEON E5-2699 v3
    Motherboard
    ASUS X99-A
    Memory
    64GB Teamgroup UD4-3600
    Graphics Card(s)
    NVIDIA GeForce GTX 1080 Ti
    Sound Card
    Integrated
    Monitor(s) Displays
    ACER X34 Predator
    Screen Resolution
    3440 x 1440
    Hard Drives
    Crucial CT1000P 3P SSD8 1TB
    Crucial CT1000 BX500 SSD 1TB
    PSU
    GameMax Pro
    Case
    Fractal Design
    Cooling
    Corsair H110iGT + 6 140mm Fans
    Keyboard
    Corsair K4
    Mouse
    G-Skill G502
    Internet Speed
    300MBs
    Browser
    Chrome
    Antivirus
    OEM
    Other Info
    ASUS RT-AC87U Router
  • At a glance

    25H2 26200.50748GB
    Operating System
    25H2 26200.5074
    Computer type
    Laptop
    Manufacturer/Model
    ASUS X555LA
    Memory
    8GB
    Browser
    Chrome
    Antivirus
    OEM
What's the point of a script if people have to manually edit files? Most people won't be able to achieve this. Most people would just use the likes of RUFUS
startnet.cmd and winpeshl.ini are edited once forever. Bypass.cmd is well known. They are ready for any usb once prepared.
 

My Computer 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
What's the point of a script if people have to manually edit files? Most people won't be able to achieve this. Most people would just use the likes of RUFUS
Please note that other easy methods are available.
Rufus or copying an unattended file (same result).

Also you (and your AI) are perpetuating the myth of fake Bypass reg keys, and AllowUpgradesWithUnsupportedTPMOrCPU for a clean install. Don't believe it? Remove these lines from your script, and re-run the test:
Code:
reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassCPUCheck" /t REG_DWORD /d 1 /f
reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassStorageCheck" /t REG_DWORD /d 1 /f
reg add "HKLM\SYSTEM\Setup\MoSetup" /v "AllowUpgradesWithUnsupportedTPMOrCPU" /t REG_DWORD /d 1 /f
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
Thanks @garlin , yes script worked even after removing mentioned keys.
 

My Computer 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
Update
Welcome again,

For bootable usb drive of Windows 11 v25H2 prepared manually{having FAT32 and NTFS partitions} ,starnet.cmd script changes. Contents of winpeshl.ini is same as in post#1.

1. Download Windows 11 v25H2 multi editions iso from Microsoft official website.

2. Run command prompt as an administrator. Assuming blank usb is plugged in, follow these steps to prepare two partitions namely BOOT {FAT32} and INSTALL {NTFS}.Replace # with correct usb drive number in your pc.

C:\Windows\System32>diskpart

DISKPART> sel disk #

DISKPART> clean
DiskPart succeeded in cleaning the disk.

DISKPART> convert mbr
DiskPart successfully converted the selected disk to MBR format.

DISKPART> create partition primary size=3072
DiskPart succeeded in creating the specified partition.

DISKPART> create partition primary
DiskPart succeeded in creating the specified partition.

DISKPART> sel partition 1
Partition 1 is now the selected partition.

DISKPART> format fs=FAT32 quick label="BOOT"
100 percent completed
DiskPart successfully formatted the volume.

DISKPART> assign letter=X
DiskPart successfully assigned the drive letter or mount point.

DISKPART> active
DiskPart marked the current partition as active.

DISKPART> sel partition 2
Partition 2 is now the selected partition.
DISKPART> format fs=NTFS quick label=INSTALL
100 percent completed
DiskPart successfully formatted the volume.
DISKPART> assign letter=Y
DiskPart successfully assigned the drive letter or mount point.
DISKPART> exit

3. Now mount the downloaded iso of Windows 11 v25H2 and copy all the contents of mounted iso to NTFS{Y:}drive.

4. Excluding sources folder , copy all contents of mounted iso to FAT32{X:}drive. In X: manually create a new folder named sources and then cut boot.wim from Y:\sources to paste in X:\sources.

5. Place Bypass.cmd with following contents in NTFS partition.To create Bypass.cmd , start Notepad and paste following contents. Click File>Save As>All Files encoding>ANSI

@echo off
title 25H2 HARDWARE BYPASS
echo [ACTION] Injecting Registry Bypasses for 25H2...

:: 1. TPM Check
reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassTPMCheck" /t REG_DWORD /d 1 /f
:: 2. Secure Boot Check
reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassSecureBootCheck" /t REG_DWORD /d 1 /f
:: 3. RAM Check (Min 4GB)
reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassRAMCheck" /t REG_DWORD /d 1 /f

echo [SUCCESS] Hardware requirements bypassed.
echo [INFO] Returning to main script...
exit /b

6.Start Notepad to create startnet.cmd with following contents.

@echo off
echo [INIT] Initializing...
X:\Windows\System32\wpeinit.exe

:: Give it a long 20s pause to ensure letters are assigned
ping -n 20 127.0.0.1 >nul

title 25H2 TARGETED DEPLOYER
color 17

:: Check only the most likely candidates
set "DRV="
if exist D:\Bypass.cmd set "DRV=D"
if exist E:\Bypass.cmd set "DRV=E"
if exist H:\Bypass.cmd set "DRV=H"

:: If still not found, search the rest as a fallback
if "%DRV%"=="" (
echo [WAIT] Checking other drives...
for %%d in (F G I J K L M N) do (
if exist %%d:\Bypass.cmd set "DRV=%%d"
)
)

:: THE REBOOT PREVENTER
if "%DRV%"=="" (
color 4F
echo [!] FATAL: Bypass.cmd not found on D, E, or H.
echo [!] Use 'diskpart' > 'list volume' to find the letter.
cmd.exe /k
)

echo [SUCCESS] Found NTFS Partition on Drive %DRV%:
call %DRV%:\Bypass.cmd

cd /d %DRV%:\sources
setup.exe /installfrom:%DRV%:\sources\install.wim

:: Prevent reboot on exit
cmd.exe /k

Click File>Save As>All Files encoding ANSI

winpeshl.ini is same as created in post #1. Contents are
[LaunchApp]
AppPath = %SYSTEMROOT%\System32\startnet.cmd

Click File>Save As>All Files encoding ANSI

7.Follow steps in post#1 above to mount, copy startnet.cmd, winpeshl.ini and unmount to commit. PLease refer to my text file attached named commands.txt
Also please follow my conversation link posted above , it is updated for this new workflow.Find attached files in zip folder along with html file showing conversation with all necessary steps.

Link to my conversation is https://gemini.google.com/app/e221d3dff43c045d

8.Now boot from this modified boot disk . It should install Windows 11 v25H2 on any unsupported pc hardware.

Special thanks to https://gemini.google.com/

Thank you for reading and sharing your valuable time in this post.
 

Attachments

Last edited:

My Computer 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

Latest Support Threads

Back
Top Bottom