Windows 11 24H2 26100.1150 SysPrep failed on specialize stage ( "Microsoft-Windows-Deployment" component)

Krzysztof Gajda 0 Reputation points
2024-07-17T06:22:46.0366667+00:00

Hi

I'm using SysPrep for years, currently with Windows 10 22H2 19045.4529 and Windows 11 23H2 22631.3737 I have no problems at all.

Today I've tried to sysprep Windows 11 24H2 26100.1150 using my unattend.xml (that I've using on mentioned W11 23H2), the auditing and generalize went fine, but when I've check my new image then latest W11 "doesn't like" the "Microsoft-Windows-Deployment" section in my unattend.xml

Here is the "Microsoft-Windows-Deployment" section.

<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">
   <Description>Allow install without network</Description>
   <Order>1</Order>
   <Path>reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE /v BypassNRO /t REG_DWORD /d 1 /f</Path>
  </RunSynchronousCommand>
  <RunSynchronousCommand wcm:action="add">
   <Description>disable consumer features</Description>
   <Order>2</Order>
   <Path>reg add HKLM\Software\Policies\Microsoft\Windows\CloudContent /v DisableWindowsConsumerFeatures /t REG_DWORD /d 1 /f</Path>
  </RunSynchronousCommand>
  <RunSynchronousCommand wcm:action="add">
   <Description>Turn On System Protection for C:</Description>
   <Order>3</Order>
   <Path>WMIC /Namespace:\\root\default Path SystemRestore Call Enable "C:\"</Path>
  </RunSynchronousCommand>
 </RunSynchronous>
</component>

What is new in SysPrep that cause this error? I've tried to find something about recent changes in SysPrep in MS pages, but I've found nothing.

PS: I've found that someone has problem with SysPrep too in Windows 11 24H2

https://answers.microsoft.com/it-it/windows/forum/all/windows-11-24h2-sysprep/6b995d88-6d9b-4699-a4a2-7849e22e69

EDIT:

Meanwhile, I was looking for a solution myself and there was an error in the C:Windows directory (in the Setupact.log and Setuperr.log files) at:

WMIC /Namespace:\\root\default Path SystemRestore Call Enable "C:\"

Strange, because in the previous version of Windows 11 (and in all Windows 10), there were no WMIC restrictions in this setup phase.

EDIT2: the wmic.exe is deprecated in Windows 24H2 26100.x, so I used instead:

PowerShell.exe -ExecutionPolicy Bypass -command "& { Enable-ComputerRestore -Drive c: }" -Verb RunAs

and works fine.

Case closed

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,050 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,896 questions
0 comments No comments
{count} votes