I'm trying to run Sysprep on Windows 11 23H2.
C:\Windows\System32\Sysprep\Panther\setuperr.log shows the following:
SYSPRP RunPlatformActions:Failed while executing Sysprep session actions; dwRet = 0x1501
SYSPRP RunDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x1501
SYSPRP WinMain:Hit failure while processing sysprep cleanup providers; hr = 0x80071501
I'm aware that some apps need to be removed, being incompatible with Sysprep, so my script attempts removing these ones:
"Microsoft.Xbox*",
"Microsoft.XboxGameCallableUI",
"Microsoft.People",
"Microsoft.ZuneMusic",
"Microsoft.ZuneVideo",
"Microsoft.WindowsCommunicationsApps", # Mail & Calendar
"Microsoft.SkypeApp",
"Microsoft.MicrosoftOfficeHub",
"Microsoft.Microsoft3DViewer",
"Microsoft.MicrosoftStickyNotes",
"Microsoft.YourPhone",
"Microsoft.GetHelp",
"Microsoft.Getstarted",
"Microsoft.WindowsFeedbackHub",
"Microsoft.OneConnect",
"Microsoft.BingWeather",
"Microsoft.BingNews",
"Microsoft.Todos",
"Microsoft.549981C3F5F10", # Cortana
"Microsoft.3DBuilder",
"Microsoft.MicrosoftSolitaireCollection",
"Microsoft.MixedReality.Portal",
"Microsoft.XboxSpeechToTextOverlay",
"Microsoft.WindowsAlarms",
"Microsoft.WindowsMaps",
"Microsoft.MicrosoftEdge*",
"Microsoft.WindowsCamera",
"Microsoft.Copilot",
"Microsoft.OneDriveSync",
"Microsoft.Widgets",
"Microsoft.Windows.WebExperience"
What could cause this problem and how could I fix it?