arrowflash
New member
- Local time
- 2:58 PM
- Posts
- 13
- OS
- Windows 11 24H2 Enterprise LTSC
Since the Windows 8 days and with multiple Windows 10 builds up to 22H2, I've always been building custom sysprepped, generalized install images using answer files and copyprofile feature, always with the same method. Clean install in a VM, enter audit mode with Ctrl+Shift+F3 during OOBE, make all required changes, install and configure software, etc. and then wrap it all up with sysprep.exe /generalize /oobe /shutdown /unattend:c:\windows\deploy_win.xml. Then mount the VM Windows partition, create an install.wim using dism, and throw it in a standard Windows install iso.
Never used autounattend.xml before, I remember I tried, but ran into issues with past versions of Windows, and my method has always worked fine.
But now I'm finally taking the dive into Windows 11, starting with Windows 11 24H2 Enterprise LTSC, and I'm running into issues using this method. The main problem, is that I also want to bypass the system requirements check for TPM, SecureBoot, RAM, etc. during Windows PE stage. And this isn't working alongside my custom answer file (I know it works in schneegans autounattend though), and it's causing me a major headache. I'm stuck.
This is my old unmodified unattend xml that has always worked prior to Windows 11. I apply this xml using sysprep while still in audit mode, with sysprep.exe /generalize /oobe /shutdown /unattend:c:\windows\deploy_win.xml. In this form, it actually works without issues on Windows 11 24H2 (and Windows 2025) as well, but the requirements restrictions obviously aren't bypassed:
(it's not a fully unattended install, user should be prompted for partitioning and formatting, but otherwise it should be unattended)
My first attempt at fixing the issue, was to add a windowsPE pass copied from schneegan's autounattend.xml files, between offlineServicing and generalize passes:
But this isn't working. When I run the sysprep command, it fails with an error message saying there's a syntax error in the deploy_win.xml file, in the first <RunSynchronousCommand wcm:action="add"> line. After lots of testing, investigation and wasted time, I realized that if I removed wcm:action="add" and left only <RunSynchronousCommand>, sysprep would complete without errors and shut down the machine. However, with this modification the restrictions wouldn't be bypassed. Looks like it doesn't do anything without "wcm:action=add" despite Microsoft documentation claiming it's a valid way to call <RunSynchronousCommand>.
Then, I attempted the following workarounds, without sucess:
First, I didn't modify my install.wim and just copied the .xml as an autounattend.xml in the .iso image root dir (This way I actually managed to complete install and restrictions were apparently disabled, but there were several errors during OOBE, and copyprofile didn't work).
Second, tried a rebuilt install.wim without a xml answer file generated during audit mode (only syspre.exe /generalize /oobe /shutdown), and a full autounattend.xml in the .iso image root dir, with <RunSynchronousCommand wcm:action="add"> lines. When I do this, the system gets stuck in a reboot loop soon after WinPE starts when booting from the .iso. Tried in both a Windows 11 24H2 Enterprise LTSC image, and a Windows Server 2025 image, same result. Besides, later I realized copyprofile isn't supposed to work from autounnatend.xml.
Third, tried the two separate answer files method as described in Problems with CopyProfile - Windows 10 Help Forums
My original xml answer file applied in audit mode without a windowsPE pass, and an autounnatend.xml with only the windowsPE pass. Same result, stuck in a reboot loop.
Also tried forcing the old legacy setup by adding to the beginning of windowsPE pass in autounattend.xml:
But this brought no results either.
Now I'm pretty much stuck and without ideas of what else I could do or try. I think the issue could be some deprecated entry in my answer file, but I'm not sure, since the original file works in Windows 11 - only when I try to add the requirements bypasses, everything falls apart. Hoping some expert here could help me or at least give some ideas. Thanks.
Never used autounattend.xml before, I remember I tried, but ran into issues with past versions of Windows, and my method has always worked fine.
But now I'm finally taking the dive into Windows 11, starting with Windows 11 24H2 Enterprise LTSC, and I'm running into issues using this method. The main problem, is that I also want to bypass the system requirements check for TPM, SecureBoot, RAM, etc. during Windows PE stage. And this isn't working alongside my custom answer file (I know it works in schneegans autounattend though), and it's causing me a major headache. I'm stuck.
This is my old unmodified unattend xml that has always worked prior to Windows 11. I apply this xml using sysprep while still in audit mode, with sysprep.exe /generalize /oobe /shutdown /unattend:c:\windows\deploy_win.xml. In this form, it actually works without issues on Windows 11 24H2 (and Windows 2025) as well, but the requirements restrictions obviously aren't bypassed:
Code:
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="offlineServicing">
<component name="Microsoft-Windows-LUA-Settings" 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">
<EnableLUA>true</EnableLUA>
</component>
</settings>
<settings pass="generalize">
<component name="Microsoft-Windows-Security-SPP" 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">
<SkipRearm>1</SkipRearm>
</component>
</settings>
<settings pass="specialize">
<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">
<CopyProfile>true</CopyProfile>
<TimeZone>E. South America Standard Time</TimeZone>
</component>
</settings>
<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>0416:00000416</InputLocale>
<SystemLocale>pt-BR</SystemLocale>
<UILanguage>pt-BR</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>pt-BR</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">
<OOBE>
<HideEULAPage>true</HideEULAPage>
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<NetworkLocation>Other</NetworkLocation>
<ProtectYourPC>3</ProtectYourPC>
<SkipMachineOOBE>true</SkipMachineOOBE>
<SkipUserOOBE>true</SkipUserOOBE>
<UnattendEnableRetailDemo>false</UnattendEnableRetailDemo>
<HideLocalAccountScreen>true</HideLocalAccountScreen>
</OOBE>
<UserAccounts>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Name>user01</Name>
<DisplayName>user01</DisplayName>
<Group>Administrators;Users</Group>
<Description>Conta de usuario padrao criada pela instalacao do Windows.</Description>
<Password>
<PlainText>true</PlainText>
<Value></Value>
</Password>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<TimeZone>E. South America Standard Time</TimeZone>
<AutoLogon>
<Username>user01</Username>
<Enabled>true</Enabled>
<LogonCount>2</LogonCount>
<Password>
<PlainText>true</PlainText>
<Value></Value>
</Password>
</AutoLogon>
</component>
<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">
<ExtendOSPartition />
<Reseal />
</component>
</settings>
</unattend>
(it's not a fully unattended install, user should be prompted for partitioning and formatting, but otherwise it should be unattended)
My first attempt at fixing the issue, was to add a windowsPE pass copied from schneegan's autounattend.xml files, between offlineServicing and generalize passes:
Code:
<settings pass="windowsPE">
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<ImageInstall>
<OSImage>
<Compact>false</Compact>
</OSImage>
</ImageInstall>
<UserData>
<ProductKey>
<Key>00000-00000-00000-00000-00000</Key>
</ProductKey>
<AcceptEula>true</AcceptEula>
</UserData>
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Order>1</Order>
<Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassTPMCheck /t REG_DWORD /d 1 /f</Path>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>2</Order>
<Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassSecureBootCheck /t REG_DWORD /d 1 /f</Path>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>3</Order>
<Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassRAMCheck /t REG_DWORD /d 1 /f</Path>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
But this isn't working. When I run the sysprep command, it fails with an error message saying there's a syntax error in the deploy_win.xml file, in the first <RunSynchronousCommand wcm:action="add"> line. After lots of testing, investigation and wasted time, I realized that if I removed wcm:action="add" and left only <RunSynchronousCommand>, sysprep would complete without errors and shut down the machine. However, with this modification the restrictions wouldn't be bypassed. Looks like it doesn't do anything without "wcm:action=add" despite Microsoft documentation claiming it's a valid way to call <RunSynchronousCommand>.
Then, I attempted the following workarounds, without sucess:
First, I didn't modify my install.wim and just copied the .xml as an autounattend.xml in the .iso image root dir (This way I actually managed to complete install and restrictions were apparently disabled, but there were several errors during OOBE, and copyprofile didn't work).
Second, tried a rebuilt install.wim without a xml answer file generated during audit mode (only syspre.exe /generalize /oobe /shutdown), and a full autounattend.xml in the .iso image root dir, with <RunSynchronousCommand wcm:action="add"> lines. When I do this, the system gets stuck in a reboot loop soon after WinPE starts when booting from the .iso. Tried in both a Windows 11 24H2 Enterprise LTSC image, and a Windows Server 2025 image, same result. Besides, later I realized copyprofile isn't supposed to work from autounnatend.xml.
Third, tried the two separate answer files method as described in Problems with CopyProfile - Windows 10 Help Forums
My original xml answer file applied in audit mode without a windowsPE pass, and an autounnatend.xml with only the windowsPE pass. Same result, stuck in a reboot loop.
Also tried forcing the old legacy setup by adding to the beginning of windowsPE pass in autounattend.xml:
Code:
<RunSynchronousCommand wcm:action="add">
<Description>Switch to legacy Setup</Description>
<Order>1</Order>
<Path>reg add "HKEY_LOCAL_MACHINE\SYSTEM\Setup" /v CmdLine /t REG_SZ /d "X:\sources\setup.exe" /f</Path>
</RunSynchronousCommand>
But this brought no results either.
Now I'm pretty much stuck and without ideas of what else I could do or try. I think the issue could be some deprecated entry in my answer file, but I'm not sure, since the original file works in Windows 11 - only when I try to add the requirements bypasses, everything falls apart. Hoping some expert here could help me or at least give some ideas. Thanks.
- Windows Build/Version
- Windows 11 24H2 Enterprise LTSC
My Computer
System One
-
- OS
- Windows 11 24H2 Enterprise LTSC
- Computer type
- PC/Desktop