Sysprep was not able to validate your Windows installation - Windows 11
This post describes how to fix the error:
Sysprep was not able to validate your Windows installation.
Review the log file at
%WINDIR%\System32\Sysprep\Panther\setupact.log for details. After resolving the issue, use Sysprep to validate your installation again.
which can occur when you run the System Preparation Tool 3.14 on Windows 11.
I've identified two potential causes for this error.
Open the Panther folder in the Sysprep directory, copy the setupact.log file out of that directory to open it, then scroll to the bottom to see the error.
Package Provisioning
Error
Error SYSPRP Failed to remove apps for the current user: 0x80073cf2.
Cause
Just above this, you can see a potential cause, in this case it's the Microsoft.OneDriveSync package:
SYSPRP Package Microsoft.OneDriveSync_21196.921.7.0_neutral__8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.
Resolution
I removed the packages causing sysprep to error in PowerShell ISE by running the following script:
Get-AppxPackage Microsoft.OneDriveSync | Remove-AppxPackage
Get-AppxPackage MicrosoftWindows.Client.WebExperience | Remove-AppxPackage
Get-AppxPackage Microsoft.LanguageExperiencePacken-GB | Remove-AppxPackage
Windows Update
Error
If the error is as follows:
SYSPRP Sysprep_Clean_Validate_Opk: Audit mode can't be turned on if there is an active scenario.; hr = 0x800F0975
SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing 'Sysprep_Clean_Validate_Opk' from C:\Windows\System32\spopk.dll; dwRet = 0x975
SysprepSession::Validate: Error in validating actions from C:\Windows\System32\Sysprep\ActionFiles\Cleanup.xml; dwRet = 0x975
RunPlatformActions:Failed while validating Sysprep session actions; dwRet = 0x975
RunDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x975
WinMain:Hit failure while pre-validate sysprep cleanup internal providers; hr = 0x80070975
Cause
Resolution
Fix
Sysprep should now run successfully:
Thank you!! This allowed me to run sysprep on Windows 11. Have you run into any issues with OneDrive with the Sysprepped images when the image/machine was put into use?
ReplyDeleteGlad my post helped. I don't use OneDrive on the machines that I have run sysprep on. However, it could be that the OneDriveSync package needs reinstalling after running sysprep, if it was removed to resolve the sysprep error.
DeleteJust for kicks, I did yet another install of Win11 on a test laptop, ran your PowerShell commands and then re-ran sysprep. After sysprep completed I booted it back up, and ran through Windows 11 OOBE setup with my personal Microsoft Account. I did not notice any OneDrive issues. Everything was syncing with no issues from what I can tell!
DeleteExcellent! Thanks for the update.
DeleteThank you!! this helped me resolve my sysprep issue with Windows 11. Adding the removal of MicrosoftWindows.Client.WebExperience did the trick.
ReplyDeleteThanks for the feedback. I'm glad my post helped!
Delete