SYSPREP Package Error
The pesky “package microsoft.widgetsplatformruntime_1.4.0.0_x64__8wekyb3d8bbwe was installed for a user but not provisioned for all users” error during sysprep found in /panther/setuperr.log#
This error isn’t limited to the package mentioned above—it can affect other packages as well. I encountered this issue while updating an RDS VDI image for a Hyper-V deployment after applying Windows updates. While some users report this occurring after the 24H2 update, in my case, it happened with a much newer update.
Solution:#
1. Check for Installed Packages
Open PowerShell as an administrator and run the following command to list all installed instances of the package for all users:
Get-AppxPackage -AllUsers | Where-Object {$_.PackageFullName -like "Microsoft.WidgetsPlatformRuntime"} | Format-List -Property PackageFullName, PackageUserInformation
2. Remove the Package for All Users
If the package appears in the list, remove it for all users by running:
Remove-AppxPackage -Package <PackageFullName> -AllUsers
Note: Replace <PackageFullName>
with the actual name obtained in the previous step.
3. Remove the Provisioned Package
To prevent the package from being reinstalled for new users, remove the provisioned version:
Remove-AppxProvisionedPackage -Online -PackageName <PackageFullName>
4. Re-run Sysprep
After successfully removing the package, attempt to run Sysprep again.
If the issue persists, review the Sysprep logs for more detailed information. Logs can be found at:
%WINDIR%\System32\Sysprep\Panther\setupact.log
%WINDIR%\System32\Sysprep\Panther\setuperr.log