In some cases, when you try to generalize your Windows image using the sysprep.exe command (sysprep.exe /generalize /oobe /shutdown), you may receive a “Sysprep was unable to validate your Windows installation” error.
The Sysprep (System Preparation Tool) is commonly used to prepare a reference Windows image and depersonalize it by removing all unique identifiers (SID, GUID) from the operating system. The sysprep is required for deploy your golden Windows image on computers in the corporate network (see our guide on how to use Sysprep in Windows).
System Preparation Tool 3.14
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.
How to Fix: Sysprep Was Not Able to Validate Your Windows Installation?
This Sysrep may fail to validate your Windows installation for several reasons. You will need to navigate to the C:\Windows\System32\Sysprep\Panther directory to get a detailed error description. Open the sysprep log file (setupact.log) using any text editor (for example, Notepad). Run the command:
notepad %windir%\system32\Sysprep\panther\setupact.log
Scroll through the contents of the setupact.log file from bottom to top and look for the errors. Depending on the error found, you may need to take the following actions to fix it.
The most common causes for this Sysprep error on Windows are:
- BitLocker encryption enabled on the system OS drive;
- Additional Windows Store (UWP) apps you have installed;
- You have removed some built-in Microsoft Store apps;
- You are using an instance of Windows that has been upgraded from a previous version of the operating system (for example, from Windows 10 to Windows 11);
- Pending Windows Update installation.
Turn BitLocker Off to Run Sysprep
Check the setupact.log log for an error that is related to BitLocker:
Error SYSPRP BitLocker-Sysprep: BitLocker is on for the OS volume. Turn BitLocker off to run Sysprep. (0x80310039)
Error [0x0f0082] SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing ‘ValidateBitLockerState’ from C:\Windows\System32\BdeSysprep.dll
Open the command prompt as administrator and run the command:
manage-bde -status
It should return the following info:
Disk volumes that can be protected with BitLocker Drive Encryption: Volume C: [OSDisk] Conversion Status: Encryption in Progress
This error mostly occurs on Windows 10/11 tablets and laptops that support InstantGo encryption (based on BitLocker). To fix this error, you must disable encryption for the Windows system volume by using the following PowerShell command:
Disable-Bitlocker –MountPoint ‘C:’
Wait for the disk to decrypt. Run the command:
manage-bde -status
The disk status should change to:
Conversion Status: Fully Decrypted Protection Status: Protection Off
After this, you will be able to run the Sysprep command again.
SYSPREP Failed to Remove Apps for User
Check if there are such errors in the setupact.log:
Error SYSPRP Package SomeAppName_1.2.3.500_x64__8we4y23f8b4ws 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.Exit code of RemoveAllApps thread was 0x3cf2
This means that you have manually installed third-party app from the Microsoft Store (UWP, APPX), or have incorrectly uninstalled a particular application.
Try to remove this app package using the PowerShell commands (run the command in the PowerShell console as Administrator):
Get-AppxPackage –Name *SomeAppName* | Remove-AppxPackage Remove-AppxProvisionedPackage -Online -PackageName SomeAppName_1.2.3.500_x64__8we4y23f8b4ws
If the UWP app is installed for a different user account, you need to remove it from the other users’ profiles. Run the PowerShell command:
Get-AppxPackage -AllUsers | ? {$_.PackageFullName -eq 'SomeAppName_1.2.3.500_x64__8we4y23f8b4ws'}
Check the PackageUserInformation value. If any of the local users have this package Installed, you can remove the APPX for all users:
Remove-AppxPackage -Package 'SomeAppName_1.2.3.500_x64__8we4y23f8b4ws' –AllUsers
Then remove this provision package from your Windows image:
Remove-AppxProvisionedPackage -Online -PackageName 'SomeAppName_1.2.3.500_x64__8we4y23f8b4ws'
Reboot the computer and try to run Sysprep again.
The next time Sysprep might fail in another Microsoft Store app. Delete it as described above. All non-built-in apps from the Microsoft Store should be removed.
Removing some of the built-in Microsoft Store applications may also prevent Sysprep from running. In this case, the following error will appear in setupact.log:
SYSPRP Package SomeAppName_1.2.3.500_x64__8we4y23f8b4ws was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.
You must use the PowerShell one-liner to reinstall all built-in UWP apps:
Get-AppxPackage -AllUsers| Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\AppXManifest.xml”}
Hint. Also, disconnect your device from the Internet or disable Automatic Updates in Audit mode before you sysprep your Windows image. This will prevent the Microsoft Store from automatically updating apps. You should also delete all the local user profiles, leaving only the local administrator profile in place. Use the netplwiz snap-in to delete additional user accounts.
Sysprep Will not Run on an Upgraded OS
If you are upgrading your operating system from an earlier version of Windows (Windows 10, Windows 8.1, or Windows 7 SP1), you should see an error in the setupact.log file when you try to run Sysprep.
Error [0x0f0036] SYSPRP spopk.dll:: Sysprep will not run on an upgraded OS. You can only run Sysprep on a custom (clean) install version of Windows.
[0x0f0082] SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing ‘Sysprep_Clean_Validate_Opk’ from C:\Windows\System32\spopk.dll; dwRet = 0x139f
Microsoft doesn’t recommend to run a Sysprep on Windows image that has been upgraded from a previous version of Windows.
Microsoft doesn’t recommend running a Sysprep on a Windows image that has been updated from an earlier version of Windows. The supported scenario is to sysprep only a Windows image you got after a clean installation. However, there is a way to bypass this restriction:
- Open the Registry Editor (regedit.exe) and go to the following registry key HKEY_LOCAL_MACHINE\SYSTEM\Setup;
- Find the registry parameter named Upgrade and delete it;
- Then navigate to the key HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus and change the parameter of the CleanupState key to 7.
This will cause Sysprep to assume that this copy of Windows is being installed in a clean install mode. Restart the computer and run Sysprep again.
Sysprep Fails During Windows Update Installation
Another Sysprep error occurs in new Windows 10 builds (1909, 20H2, 21H1,22H1). Sysprep fails with the following error in the setupact.log:
Error SYSPRP Sysprep_Clean_Validate_Opk: Audit mode can’t be turned on if there is an active scenario.; hr = 0x800F0975
Error SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing ‘Sysprep_Clean_Validate_Opk’ from C:\Windows\System32\spopk.dll; dwRet = 0x975
Error SYSPRP SysprepSession::Validate: Error in validating actions from C:\Windows\System32\Sysprep\ActionFiles\Cleanup.xml; dwRet = 0x975
Error SYSPRP RunPlatformActions:Failed while validating Sysprep session actions; Error [0x0f0070] SYSPRP RunDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x975
To resolve this Sysprep error, you need to pause Windows update via modern Settings control panel (Settings > Update & Security > Windows Update > Pause updates for 7 days).
Reboot your device and try to run Sysprep.
In some cases, stopping Windows Update as described above does not completely clear the Reserved Storage. In this case, an error will appear in the sysprep log:
Error SYSPRP Sysprep_Clean_Validate_Opk: Audit mode cannot be turned on if reserved storage is in use. An update or servicing operation may be using reserved storage.; hr = 0x800F0975
To fix this issue:
- Open the Registry Editor (regedit.exe);
- Navigate to the registry key HKLM\Software\Microsoft\Windows\CurrentVersion\ReserveManager;
- Change the value of the ShippedWithReserves parameter from 1 to 0;
- Then change ActiveScenario to 0;
- And disable Reserved Storage in Windows using the command:
DISM.exe /Online /Set-ReservedStorageState /State:Disabled
3 comments
Unfortunately, It doesn’t work for me. I tried most solutions on the internet, but no avail till now.
Thank you so much! After hours of stressing over the problem, this article helped me resolve the issue!
I tried 2 procedures and both of them worked. First, I sysprep the device without installing or run windows updates and it worked. Secondly, I installed all the required microsoft windows updates until there are no more update to be installed and it worked too.
The problem seems to occur when there are partial updates installed.