So, I'm almost giving up. Tried every solution Google and Microsoft Learn had to offer, nothing works.
I'm trying to Sysprep a clean Windows 11 Education 24H2 Installation (All Windows Updates are installed) but it always fails because of this error:
Error SYSPRP Package Microsoft.DesktopAppInstaller_1.25.340.0_x64__8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.
Error SYSPRP Failed to remove apps for the current user: 0x80073cf2.
Error SYSPRP Exit code of RemoveAllApps thread was 0x3cf2.
Error SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing 'SysprepGeneralizeValidate' from C:\Windows\System32\AppxSysprep.dll; dwRet = 0x3cf2
Error SYSPRP SysprepSession::Validate: Error in validating actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x3cf2
Error SYSPRP RunPlatformActions:Failed while validating Sysprep session actions; dwRet = 0x3cf2
Error [0x0f0070] SYSPRP RunDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x3cf2
Error [0x0f00d8] SYSPRP WinMain:Hit failure while pre-validate sysprep generalize internal providers; hr = 0x80073cf2
What I tried already:
- Unplugged Network Cable before Sysprepping
- No other user was ever logged in
- I ran this un-provision script: (there was already an error he cant delete this DesktopInstaller)
$aProvPackages=@(Get-AppxProvisionedPackage -Online).PackageName
Get-AppxPackage -AllUsers | ?{ -not ($aProvPackages -contains $.PackageFullName ) } | %{write-host $;Remove-AppxPackage -AllUsers -Package $_}
I also tried all this PS-Prompts: (all gave me errors, none could delete DesktopAppInstaller
Get-AppxPackage -AllUsers Microsoft.DesktopAppInstaller | Remove-AppxPackage -AllUsers
Get-AppxPackage -AllUsers Microsoft.DesktopAppInstaller | Remove-AppxPackage
Get-AppxPackage -Name Microsoft.DesktopAppInstaller | Remove-AppxPackage
Get-AppxProvisionedPackage -Online | Where-Object {$_.DisplayName -eq "Microsoft.DesktopAppInstaller"} | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | Where-Object DisplayName -eq "Microsoft.DesktopAppInstaller" | Remove-AppxProvisionedPackage -Online
Get-AppxPackage microsoft.widgets | remove-appxpackage
Get-AppxPackage -AllUsers | Remove-AppxPackage
Get-AppxProvisionedPackage -Online | Remove-AppxProvisionedPackage -Online Remove-AppxPackage -PackageFullName Microsoft.DesktopAppInstaller_1.25.340.0_x64__8wekyb3d8bbwe -AllUsers
Remove-AppxProvisionedPackage -Online -PackageName Microsoft.DesktopAppInstaller_1.25.340.0_x64__8wekyb3d8bbwe
"Turn off Microsoft consumer experiences" set to enabled
"Do not suggest third-party content in Windows spotlight" set to enabled
My unattended File should be fine, I checked it with ChatGPT
Thats the command I run for sysprep with admin priviliges
c:\windows\system32\sysprep\sysprep.exe /oobe /generalize /unattend:c:\windows\system32\sysprep\unattend.xml /shutdownI also added this to the unattend.xml file: SkipAppxRemoval true /SkipAppxRemoval
I'm doing this since over 20 years and with every new Windows OS there are new struggles. (Yeah I'm just starting now with Windows 11)
I would be greatful if someone could answer that had already encountered that problem, because googling the Internet won't help.