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.

Sysprep was not able to validate your Windows installation

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

If the error is as follows:

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

Remove Microsoft Packages using a PowerShell script

EDIT: Added 2nd potential error, cause and resolution

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

The cause could be that Windows Update is running or is part way through an installation.

Resolution

Ensure Windows Update is complete and is not running then try again.


Fix

Sysprep should now run successfully:

Sysprep is working

Related Posts




Comments

  1. 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?

    ReplyDelete
    Replies
    1. Glad 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.

      Delete
    2. Just 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!

      Delete
    3. Excellent! Thanks for the update.

      Delete
  2. Thank you!! this helped me resolve my sysprep issue with Windows 11. Adding the removal of MicrosoftWindows.Client.WebExperience did the trick.

    ReplyDelete
    Replies
    1. Thanks for the feedback. I'm glad my post helped!

      Delete

Post a Comment

Popular posts from this blog

LG TV This app will now restart to free up more memory

LG TV Clear All Browsing History Data

Excel Import CSV not using "Use First Row as Headers"