Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save asheroto/c4a9fb4e5e5bdad10bcb831e3a3daee6 to your computer and use it in GitHub Desktop.
Save asheroto/c4a9fb4e5e5bdad10bcb831e3a3daee6 to your computer and use it in GitHub Desktop.
Windows setup answer file working on Windows 11. Skips OOBE (EULA, networking) and pretty much everything else during normal setup.

Windows 10/11 Setup Answer File + TPM Bypass + CPU requirement + storage requirement + Internet requirement bypass

This is a Windows setup answer file working on Windows 10 and 11.

What it does:

  • Skips OOBE (EULA, networking) and pretty much everything else during normal setup
  • Sets Keyboard + Language to English (US)
  • Set timezone to Central Standard Time
  • Creates user "User" with password of "password"
  • Disables password expiration
  • Boots straight up to the login screen after setup is complete

Change as needed.

To apply to your Windows image, put both of these files in the root of your ISO file, named:

  • autounattend.xml

Screenshot of ISO image here (I use PowerISO to edit ISO files)...

image

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="oobeSystem">
<component name="Microsoft-Windows-International-Core" 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">
<InputLocale>0409:00000409</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>en-US</UserLocale>
</component>
<component name="Microsoft-Windows-Shell-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">
<TimeZone>Central Standard Time</TimeZone>
<OOBE>
<HideEULAPage>true</HideEULAPage>
<HideLocalAccountScreen>true</HideLocalAccountScreen>
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<NetworkLocation>Home</NetworkLocation>
<ProtectYourPC>3</ProtectYourPC>
<SkipMachineOOBE>true</SkipMachineOOBE>
<SkipUserOOBE>true</SkipUserOOBE>
</OOBE>
<UserAccounts>
<AdministratorPassword>
<PlainText>true</PlainText>
<Value></Value>
</AdministratorPassword>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Group>Administrators</Group>
<Name>User</Name>
<Password>
<PlainText>true</PlainText>
<Value>password</Value>
</Password>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
</component>
</settings>
<settings pass="specialize">
<component name="Microsoft-Windows-Deployment" 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>net accounts /maxpwage:unlimited</Path>
<WillReboot>Never</WillReboot>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>2</Order>
<Path>net user User /active:Yes</Path>
<WillReboot>Never</WillReboot>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>3</Order>
<Path>net user User /passwordreq:yes</Path>
<WillReboot>Never</WillReboot>
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-Security-SPP-UX" 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">
<SkipAutoActivation>true</SkipAutoActivation>
</component>
<component name="Microsoft-Windows-UnattendedJoin" 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">
<Identification>
<JoinWorkgroup>WORKGROUP</JoinWorkgroup>
</Identification>
</component>
</settings>
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE" 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">
<InputLocale>0409:00000409</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>en-US</UserLocale>
<SetupUILanguage>
<UILanguage>en-US</UILanguage>
</SetupUILanguage>
</component>
<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 1 /f</Path>
<Description>Add BypassTPMCheck</Description>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>2</Order>
<Path>reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassRAMCheck" /t REG_DWORD /d 1 /f</Path>
<Description>Add BypassRAMCheck</Description>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>3</Order>
<Path>reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassSecureBootCheck" /t REG_DWORD /d 1 /f</Path>
<Description>Add BypassSecureBootCheck</Description>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>4</Order>
<Path>reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassCPUCheck" /t REG_DWORD /d 1 /f</Path>
<Description>Add BypassCPUCheck</Description>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>5</Order>
<Path>reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassStorageCheck" /t REG_DWORD /d 1 /f</Path>
<Description>Add BypassStorageCheck</Description>
</RunSynchronousCommand>
</RunSynchronous>
<Diagnostics>
<OptIn>false</OptIn>
</Diagnostics>
<DynamicUpdate>
<Enable>false</Enable>
<WillShowUI>OnError</WillShowUI>
</DynamicUpdate>
<UserData>
<AcceptEula>true</AcceptEula>
<ProductKey>
<Key></Key>
</ProductKey>
</UserData>
</component>
</settings>
</unattend>
@norrcomm
Copy link

norrcomm commented Aug 3, 2023

Hi I am trying this with a WIndows install and getting this error https://prnt.sc/Vobzb8dEyRdS

Here is the process I use:
Install Windows 11 from the WIM file with this command
for %%p 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 %%p:\images\ set w=%%p
\Dism /apply-image /imagefile:%w%:\images\install.wim /index:5 /ApplyDir:W:\

  1. If I place the autounattend at the root of C:\ and reboot the WIndows install seems to ignore the XML file
  2. If I place this file in c:\Windows\Panther and reboot after applying my wim install file, the above error appears

How can I fix this using your autounattend.xml file?

@asheroto
Copy link
Author

asheroto commented Aug 3, 2023

Hello,

I have not tested this answer file against anything other than Windows installation media. I was thinking that autounattend.xml was just copied to the Panther folder at some point, so in theory that should work okay, but I'm not entirely sure.

According to this answer, you can't use the same file, as autounattend.xml is designed for Windows Setup, and by the time the system is installed, Windows Setup has already exited, and OOBE (out of box experience) has taken over.
https://superuser.com/questions/1699563/apply-autounattend-xml-after-deploying-image-with-dism

That being said, I know unattend.xml is supposed to exist in C:\Windows\Panther or C:\Windows\Panther\Unattend or several other places. This may be a slightly different configuration than autounattend.xml.

NTLite may help generate that file, perhaps you could use that to adjust? Or Microsoft Deployment Toolkit?

Since this gist doesn't contain any partitioning or disk info, I doubt that's causing an issue. The only thing I can think of is maybe it doesn't like the windowsPE section of the XML since that only applies to Windows Setup itself and not OOBE.

@Owned67
Copy link

Owned67 commented Apr 4, 2024

remove useless code, in WindowsPE, add:
<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 /d 1 /t reg_dword /f</Path></RunSynchronousCommand> <RunSynchronousCommand wcm:action="add"><Order>2</Order> <Path>reg add HKLM\SYSTEM\Setup\LabConfig /v BypassSecureBootCheck /d 1 /t reg_dword /f</Path></RunSynchronousCommand> <RunSynchronousCommand wcm:action="add"><Order>3</Order> <Path>reg add HKLM\SYSTEM\Setup\LabConfig /v BypassRAMCheck /d 1 /t reg_dword /f</Path></RunSynchronousCommand> <RunSynchronousCommand wcm:action="add"><Order>4</Order> <Path>reg add HKLM\SYSTEM\Setup\LabConfig /v BypassStorageCheck /d 1 /t reg_dword /f</Path></RunSynchronousCommand> <RunSynchronousCommand wcm:action="add"><Order>5</Order> <Path>reg add HKLM\SYSTEM\Setup\LabConfig /v BypassCPUCheck /d 1 /t reg_dword /f</Path></RunSynchronousCommand> </RunSynchronous>

@asheroto
Copy link
Author

asheroto commented Apr 4, 2024

@Owned67 thank you. I had actually updated this on my computer back in January but forgot to update it on the gist. It is now updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment