Sysprep was unable to validate your Windows installation

Sysprep (System Preparation Tool) is a Microsoft command-line utility that users use to prepare a generalized Windows system image for operating system deployment, duplication, and testing.

In this process, you need to generalize the Windows installation using the command sysprep /generalize /shutdown /oobe and delete all PC-specific data for privacy purposes. However, Sysprep cannot run this process if it fails to validate the system and returns the error message “Sysprep was unable to validate your Windows installation”.

This problem can occur due to various reasons, which we have mentioned in this article along with their solutions.

Causes why Sysprep could not validate your Windows installation

Here are the potential causes of the “Sysprep was unable to validate your Windows installation” error:

  • Running Sysprep on an upgraded Windows operating system.
  • Device encryption or BitLocker enabled.
  • Unprovisioning UWP apps for a user.
  • Presence of an active scenario such as pending system updates.
  • Corrupt Spopk.dll case.

Patches for Sysprep failed to validate your Windows installation

First, make sure to disconnect internet to avoid any automatic processes, such as updates when generalizing your Windows installation.

Then apply the possible solutions we have provided below to fix your problem.

Check log file

The Sysprep error message also indicates where you can view the error log message. So, the first thing to do is to check the log file to determine the exact reason for the problem.

  • You can open Run (Win + R) and enter notepad %windir%system32Syspreppanthersetupact.log to open this file using Notepad.

After going through the log, proceed to the corresponding solutions depending on the nature of your error.

Disable upgrade registry key and entry

Sysprep will not be able to validate your Windows installation if you try to run the processes after upgrading your system. The log should show the following or similar error message in such a scenario:

SYSPRP spopk.dll:: Sysprep will not work on an upgraded operating system. You can only run Sysprep on a custom (clean) installation version of Windows.

As the message states, Microsoft does not support running Sysprep on an upgraded Windows system and instead recommends users to install Windows first. However, you can avoid this problem by changing some registry values. Here’s how:

  1. Press Win + R to open Run.
  2. Walk in regedit to open Registry Editor.
  3. Move towards ComputerHKEY_LOCAL_MACHINESYSTEMSetup
  4. Remove both Upgrade Key and the Upgrade DWORD Value.
  5. Now go to ComputerHKEY_LOCAL_MACHINESYSTEMSetupStatusSysprepStatus.
  6. Double-click Cleaning status and set its value data to 7.

This process tricks the Windows operating system into thinking that you have a custom installation version of Windows instead of an upgrade.

Disable BitLocker

You cannot run Sysprep when your system is encrypted. If you try to do this, the error log usually shows the error message below:

SYSPRP BitLocker-Sysprep: BitLocker is enabled for the operating system volume. Disable BitLocker to run Sysprep. (0x80310039)

You may also receive other messages, but they will contain the word BitLocker.

To fix the problem, you need to disable the process. Here’s how:

  1. open race
  2. Type cmd and press Ctrl + Shift + Enter to open the elevated command prompt.
  3. Enter the following commands:
    • manage-bde -status (It indicates whether BitLocker encrypts your device or not)Manage Bitlocker state
    • Disable-Bitlocker –MountPoint ‘C:’

Disable TPM and PTT

enable-tpm

Sometimes your system thinks BitLocker is enabled even though it is actually disabled. So you will still get the above error. This happens because sometimes the BDE goes into a wait state when the TPM is detected.

There are two ways to solve the problem. You can either enable BitLocker and then disable it again.

Or you can go into your BIOS and disable the TPM (Trusted Platform Module), which is the device your system uses for encryption. You can usually find the option under Advanced, Security, or Trusted Computing in BIOS or UEFI. You may also need to disable PTT (Intel Platform Trust Technology) on some devices.

Reinstall or remove UWP app packages

If you have deprovisioned a Universal Windows Platform (UWP) app installed on one of your user accounts, the app source files will not be present on your user profile. In this case, Sysprep cannot validate the installation and you will usually find the following error message in the log file:

The SYSPRP package _1.2.3.500_x64__8we4y23f8b4ws was installed for one user, but not provisioned for all users. This package will not work correctly in the sysprep image.

You need to remove the user’s apps or remove all users with unprovisioned apps to resolve these issues.

First, try to re-register default Windows apps in case there is another problem with the app. Do this:

  1. Open Run.
  2. Type powershell and press Ctrl+Shift+Enter to open the elevated Windows PowerShell.
  3. Enter the command: Get-AppxPackage -AllUsers| Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)AppXManifest.xml”}Reinstall apps using powershell

Run Sysprep again and check if you still have the problem. If you do, you must remove UWP apps and their provisioning. You also need to manually remove apps if the error log shows something like:

SYSPRP Failed to remove applications for current user: 0x80073cf2.

Here are the necessary steps:

  1. Open the elevated Windows PowerShell.
  2. Enter the following commands:
    • Import-Module Appx
    • Import-Module Dism
    • Get-AppxPackage -AllUsers | Where PublisherId -eq 8wekyb3d8bbwe | Format-List -Property PackageFullName,PackageUserInformation
      powershell-get-appx-package
  3. If you have manually provisioned some non-UWP apps, you need to run
    Get-AppxPackage -AllUsers | Format-List -Property PackageFullName,PackageUserInformation
  4. Check all users that display Installed. If they are local accounts, delete those accounts. You can do this by following these steps:
    • Open Run and enter netplwiz.
    • Click on accounts and select Remove > Yes.
  5. Next, run the commands below to remove an application and its provisioning while replacing the by application package name:
    • Remove-AppxPackage -Package
    • Remove-AppxProvisionedPackage -Online -PackageName Delete apps using powershell
  6. Do this for all applications shown in the Sysprep log.

Complete pending updates, then pause updates

You cannot enable Sysprep audit mode if there is an active scenario such as updates. These processes use your reserved storage, which locks down your Windows operating system. In this case, the log file displays an error message similar to:

SYSPRP Sysprep_Clean_Validate_Opk: Audit mode cannot be enabled if reserved storage is in use. An update or maintenance operation may be using reserved storage space. ; time = 0x800F0975

To resolve the problem, you must install all pending cumulative updates and then pause your updates. You do not need to install optional updates.

Make sure to install necessary updates and restart your PC to complete all pending operations. Then pause your updates by following the instructions below:

  1. Open Run and enter ms-settings:windowsupdate.
  2. Click on Pause Where Break x week/s button.break-updates

Disconnect your internet connection and try running Sysprep again.

Replace the Spopk.dll File

Spopk.dll is a type of Sysprep OPK plug-in file that helps in validation of Windows installation of Sysprep. Sometimes this DLL file can get corrupted and cause problems while running Sysprep.

In such cases, the log shows an error message similar to,

SYSPRP ActionPlatform::LaunchModule: Failure occurred while performing “Sysprep_Clean_Validate_Opk” from C:WindowsSystem32spopk.dll; dwRet = 0x975

First, remove provisioning for store apps, then install cumulative updates or pause updates and try running Sysprep again. If you still have the problem, you need to replace the Spopk.dll case. Here’s how:

  1. Open the elevated command prompt.
  2. Enter the following command to take ownership and change permissions for spopk.dll:
    • takeown /f %WinDir%System32spopk.dll
    • icacls %WinDir%System32spopk.dll /Grant Administrators:f
  3. Open Run and enter %windir%System32 to open the directory in File Explorer.
  4. Download the spopk.dll file or transfer it to the System32 folder from the same location on another computer.
  5. Confirm if you get the prompt to replace the file.

Comments are closed.