Highlights of this method:
1) No third-party tools are required.
2) No action required by user - boot from the install media and install as usual.
3) Won't affect any other aspect of setup or alter the final installation of Windows in any way.
4) Can be used standalone or integrated into other unattended install answer files.
5) Can be used with both BIOS and UEFI based systems.
Super simple:
Copy the text below into a text file and name the file autounattend.xml. Place that file on the root of your install media. If you are use an ISO image file, for example, to install to a VM, simply drop the file into the root of ISO image. For a thumb drive, simply drop it on the root of the thumb drive.
That's it!
If you already use an autounattend.xml to automate Windows installation, simply add the 5 "RunSynchronousCommand" entries to your existing answer file.
How it works:
I was working with an answer file today when this idea suddenly came to me. I realized that while an answer file is normally used to automate the entire installation of Windows, there is no reason that it couldn't be used to to perform just one simple operation while leaving the rest of setup alone.
In this case, we are using the RunSynchronousCommand to run add several entries to the Windows PE registry. When you boot from your Windows install media, Windows PE is loaded to facilitate the installation of Windows. One of the very first things to happen after Windows PE is started is that an autounattend.xml is loaded if it exists and commands specified by RunSynchronousCommand entries are executed.
Since this is the only thing that we are doing in the answer file it won't affect any other aspect of the setup process. Also, it's worth noting that the only registry affected is the currently running Windows PE registry. It won't affect the final install of Windows in any way whatsoever.
Finally, a special shout out to @Kari whose excellent tutorials regarding unattended setup got me to the point where I had enough knowledge to even come up with this idea.
Enjoy!
1) No third-party tools are required.
2) No action required by user - boot from the install media and install as usual.
3) Won't affect any other aspect of setup or alter the final installation of Windows in any way.
4) Can be used standalone or integrated into other unattended install answer files.
5) Can be used with both BIOS and UEFI based systems.
Super simple:
Copy the text below into a text file and name the file autounattend.xml. Place that file on the root of your install media. If you are use an ISO image file, for example, to install to a VM, simply drop the file into the root of ISO image. For a thumb drive, simply drop it on the root of the thumb drive.
That's it!
Code:
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Order>1</Order>
<Path>reg add HKLM\System\Setup\LabConfig /v BypassTPMCheck /t reg_dword /d 0x00000001 /f</Path>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>2</Order>
<Path>reg add HKLM\System\Setup\LabConfig /v BypassSecureBootCheck /t reg_dword /d 0x00000001 /f</Path>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>3</Order>
<Path>reg add HKLM\System\Setup\LabConfig /v BypassRAMCheck /t reg_dword /d 0x00000001 /f</Path>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>5</Order>
<Path>reg add HKLM\System\Setup\LabConfig /v BypassCPUCheck /t reg_dword /d 0x00000001 /f</Path>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>4</Order>
<Path>reg add HKLM\System\Setup\LabConfig /v BypassStorageCheck /t reg_dword /d 0x00000001 /f</Path>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
</unattend>
How it works:
I was working with an answer file today when this idea suddenly came to me. I realized that while an answer file is normally used to automate the entire installation of Windows, there is no reason that it couldn't be used to to perform just one simple operation while leaving the rest of setup alone.
In this case, we are using the RunSynchronousCommand to run add several entries to the Windows PE registry. When you boot from your Windows install media, Windows PE is loaded to facilitate the installation of Windows. One of the very first things to happen after Windows PE is started is that an autounattend.xml is loaded if it exists and commands specified by RunSynchronousCommand entries are executed.
Since this is the only thing that we are doing in the answer file it won't affect any other aspect of the setup process. Also, it's worth noting that the only registry affected is the currently running Windows PE registry. It won't affect the final install of Windows in any way whatsoever.
Finally, a special shout out to @Kari whose excellent tutorials regarding unattended setup got me to the point where I had enough knowledge to even come up with this idea.
Enjoy!
Last edited:
My Computers
System One System Two
-
- OS
- Win11 Pro 22H2, Moment 2
- Computer type
- PC/Desktop
- Manufacturer/Model
- Home Built
- CPU
- Intel i7-11700K
- Motherboard
- ASUS Prime Z590-A
- Memory
- 128GB Crucial Ballistix 3200MHz DRAM
- Graphics Card(s)
- No GPU - CPU graphics only (for now)
- Sound Card
- Realtek (on motherboard)
- Monitor(s) Displays
- HP Envy 32
- Screen Resolution
- 2560 x 1440
- Hard Drives
- 1 x 1TB NVMe Gen 4 x 4 SSD
1 x 2TB NVMe Gen 3 x 4 SSD
2 x 512GB 2.5" SSDs
2 x 8TB HD
- PSU
- Corsair HX850i
- Case
- Corsair iCue 5000X RGB
- Cooling
- Noctua NH-D15 chromax.black cooler + 10 case fans
- Keyboard
- CODE backlit mechanical keyboard
- Mouse
- Logitech MX Master 3
- Internet Speed
- 1Gb Up / 1 Gb Down
- Browser
- Chromium Edge
- Antivirus
- Windows Defender
- Other Info
- Additional options installed:
WiFi 6E PCIe adapter
ASUS ThunderboltEX 4 PCIe adapter
-
- Operating System
- Win11 Pro 22H2, Moment 2
- Computer type
- Laptop
- Manufacturer/Model
- HP Spectre x360 15-BL012DX
- CPU
- Intel i7-7500U
- Memory
- 32GB
- Graphics card(s)
- Dual Intel HD 620 and Nvidia GeForce 940MX
- Sound Card
- Built-in Realtek HD Audio
- Monitor(s) Displays
- 4k 15-inch
- Screen Resolution
- 4k (3840 x 2160)
- Hard Drives
- 1TB Seagate FireCuda 510 NVMe SSD
- Internet Speed
- 1Gb Up / 1Gb Down
- Browser
- Chromium Edge
- Antivirus
- Windows Defender
- Other Info
- RAM Upgraded from 16GB to 32GB WiFi Upgraded from WiFi 5 to WiFi 6 SSD upgraded from 512GB NVMe SSD to 1TB Seagate FireCuda 510 NVMe SSD