{"id":9222,"date":"2024-02-28T10:08:11","date_gmt":"2024-02-28T10:08:11","guid":{"rendered":"https:\/\/cheapwindowsvps.com\/blog\/how-to-resolve-sysprep-errors-when-sysprep-fails\/"},"modified":"2025-01-20T10:17:40","modified_gmt":"2025-01-20T10:17:40","slug":"how-to-resolve-sysprep-errors-when-sysprep-fails","status":"publish","type":"post","link":"https:\/\/cheapwindowsvps.com\/blog\/how-to-resolve-sysprep-errors-when-sysprep-fails\/","title":{"rendered":"How to Resolve Sysprep Errors: When Sysprep Fails"},"content":{"rendered":"<p><div>In this post, you will learn what to do when Sysprep fails and how to fix the error: Sysprep was not able to validate your Windows installation.<\/div>\n<\/p>\n<p><p>Sysprep is a built-in Windows tool used to generalize OS images before deploying them to multiple machines. There are several reasons why Sysprep fails, but the error message usually states that the validation of the Windows installation has failed.<\/p>\n<\/p>\n<p><a href=\"https:\/\/4sysops.com\/wp-content\/uploads\/2024\/02\/Sysprep-was-not-able-to-validate-your-Windows-installation.png\" rel=\"nofollow noopener\" target=\"_blank\">Sysprep was not able to validate your Windows installation<\/a><\/p>\n<p><p>If Sysprep fails to create the generalized image, the first step is to check the <em>setupact.log<\/em> file. This log file can provide valuable information to help troubleshoot and resolve the Sysprep errors.<\/p>\n<\/p>\n<p><h2>Identifying Sysprep errors in setupact.log<\/h2>\n<\/p>\n<p><p>Sysprep generates a log file upon successful or failed completion. The log file <strong>setupact.log<\/strong> is located at <em>%WINDIR%System32Panther<\/em>.<\/p>\n<\/p>\n<p><a href=\"https:\/\/4sysops.com\/wp-content\/uploads\/2024\/02\/setupact.log-\u2013-The-Sysprep-log-file.png\" rel=\"nofollow noopener\" target=\"_blank\">setupact.log \u2013 The Sysprep log file<\/a><\/p>\n<p><p>Based on the errors found in the setupact.log file, you can identify the root cause and apply the corresponding fixes. In the following section, we will address the known issues.<\/p>\n<\/p>\n<p><h2>Sysprep failed to remove apps for the current user<\/h2>\n<\/p>\n<p><p>When Sysprep encounters a failure, this is often due to conflicts that arise with Microsoft applications. A case in point is when Sysprep doesn&#8217;t succeed in removing the Microsoft Edge package, as illustrated in the following example.<\/p>\n<\/p>\n<p><p>The subsequent error message found in setupact.log is as follows:<\/p>\n<\/p>\n<p><p><em>SYSPRP Package Microsoft.MicrosoftEdge.Stable_120.0.2210.91_neutral_8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not operate in the sysprep image. <\/em><\/p>\n<\/p>\n<p><p><em>SYSPRP Failed to remove apps for the current users: 0x80073cf2.<\/em><\/p>\n<\/p>\n<p><p>In this scenario, the error <strong>SYSPRP Failed to remove apps for the current user<\/strong> implies that the Microsoft Edge package couldn&#8217;t be deleted. However, you can manually uninstall it by using PowerShell.<\/p>\n<\/p>\n<p><p>To do this, firstly launch PowerShell as Administrator and then run the following command:<\/p>\n<\/p>\n<p><a href=\"https:\/\/4sysops.com\/wp-content\/uploads\/2024\/02\/SYSPRP-Failed-to-remove-apps-for-the-current-users:-0x80073cf2.png\" rel=\"nofollow noopener\" target=\"_blank\">SYSPRP Failed to remove apps for the current users: 0x80073cf2<\/a><\/p>\n<p><pre>Get-APPXPackage Microsoft.MicrosoftEdge.Stable Remove-APPXPackage<\/pre>\n<\/p>\n<p><div><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/4sysops.com\/wp-content\/uploads\/2024\/02\/Removing-Edge-with-APPXPackage.png\">Removing Edge with APPXPackage<\/a><\/div>\n<\/p>\n<p><p>If you rerun Sysprep, the image will be generalized correctly.<\/p>\n<\/p>\n<p><div><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/4sysops.com\/wp-content\/uploads\/2024\/02\/Processing-generalize-phase-using-Sysprep.png\">Processing generalize phase using Sysprep<\/a><\/div>\n<\/p>\n<p><p>This example is specific to the <em>Microsoft Edge.Stable package<\/em>. However, the issue can also occur in other apps. You can check for affected apps in the setupact.txt log file.<\/p>\n<\/p>\n<p><h2>Audit mode can\u2019t be turned on if there is an active scenario<\/h2>\n<\/p>\n<p><p>If pending updates exist on your machine and you then run Sysprep, setupact.log will contain the following error message:<\/p>\n<\/p>\n<p><p><em>Error SYSPRP: Audit mode can\u2019t be turned on if there is an active scenario.; hr = 0x800F0975.<\/em><\/p>\n<\/p>\n<p><p>Sysprep will not work if there are active or pending updates. First, finish installing any pending updates, restart your Windows machine, and then rerun Sysprep.<\/p>\n<\/p>\n<p><h2>Syprep fails after installing updates<\/h2>\n<\/p>\n<p><p>Sometimes, Sysprep fails after you install new updates on your reference machine. The easiest solution is to uninstall the new updates and then rerun Sysprep.<\/p>\n<\/p>\n<ol>\n<li>Navigate to <strong>Programs and Features &gt; Installed Programs<\/strong>.<\/li>\n<li>Identify and select the update.<\/li>\n<li>Right-click on the update and then click <strong>Uninstall<\/strong>.<\/li>\n<li>Reboot Windows.<\/li>\n<li>Run Sysprep.<\/li>\n<\/ol>\n<p><a href=\"https:\/\/4sysops.com\/wp-content\/uploads\/2024\/02\/Uninstalling-an-update.png\" rel=\"nofollow noopener\" target=\"_blank\"><\/a><\/p>\n<p><p>Make sure that the updates are installed after you deploy the image.<\/p>\n<h2>Error SYSPRP BitLocker-Sysprep<\/h2>\n<p>If you are using BitLocker to encrypt disks, you will encounter the following error in setupact.log when you run Sysprep:<\/p>\n<p><em>Error SYSPRP BitLocker-Sysprep: BitLocker is on for the OS volume. Turn BitLocker off to run Sysprep. (0x80310039).<\/em><\/p>\n<\/p>\n<p><p>As the error implies, you must suspend BitLocker before running Sysprep. Open the File Explorer and follow these instructions:<\/p>\n<\/p>\n<ol>\n<li>Navigate to <strong>This PC<\/strong>.<\/li>\n<li>Click on the encrypted disk and then select <strong>Manage BitLocker<\/strong>.<\/p>\n<\/li>\n<li>Click <strong>Suspend protection<\/strong>.<\/p>\n<\/li>\n<li>Rerun Sysprep.<\/li>\n<\/ol>\n<p><h2>A fatal error occurred while trying to Sysprep the machine<\/h2>\n<\/p>\n<p><p>If you try to run Sysprep more than three times on the same image, you will receive this error message:<\/p>\n<\/p>\n<p><p>A fatal error occurred while trying to Sysprep the machine.<\/p>\n<\/p>\n<p><p>In the Setuperr.log file, you may encounter the following error messages:<\/p>\n<\/p>\n<p><p>Error [0x0f0082] SYSPRP LaunchDll: The incident occurred while executing &#8216;C:WindowsSystem32slc.dll, SLReArmWindows&#8217;, returned error code -1073425657<\/p>\n<\/p>\n<p><p>Error [0x0f0070] SYSPRP RunExternalDlls: There was an error running registry sysprep DLLs, which brought the sysprep execution to a halt. dwRet = -1073425657<\/p>\n<\/p>\n<p><p><em>Error [0x0f00a8] SYSPRP WinMain: Hit failure while processing sysprep generalize providers; hr = 0xc004d307<\/em><\/p>\n<\/p>\n<p><p>This error occurs when the Windows Software Licensing Rearm program runs thrice in a single image.<\/p>\n<\/p>\n<p><p>To avoid this error, you need to edit the <em>SkipRearm<\/em> key. This will allow you to run Sysprep more than three times.<\/p>\n<\/p>\n<ol>\n<li>Run <strong>Registry Editor<\/strong> as an administrator.<\/li>\n<li>Navigate to <strong>ComputerHKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionSoftwareProtectionPlatform<\/strong>.<\/li>\n<li>Right-click on <strong>SkipRearm<\/strong> and click <strong>Edit<\/strong>.<\/li>\n<li>Enter <strong>1<\/strong> if it&#8217;s not already there, and then press <strong>Enter<\/strong>.<\/li>\n<\/ol>\n<p>Please note the &#8216;Edit SkipRearm key&#8217; from the image in the source for complete guidance.<\/p>\n<\/p>\n<p><h2>Sysprep will not run on an upgraded OS<\/h2>\n<\/p>\n<p><p>If you upgraded Windows, for instance, from Windows 10 to Windows 11, you will encounter the following error:<\/p>\n<\/p>\n<blockquote><p>Error SYSPRP: Sysprep will not run on an upgraded OS. You can only run Sysprep on a custom (clean) install version of Windows.<\/p><\/blockquote>\n<p><p>The primary solution to this problem is to begin anew and install the upgraded Windows version from scratch. However, if you&#8217;ve spent a significant amount of time configuring the old image, this solution might not be the perfect fit.<\/p>\n<\/p>\n<p><p>The workaround below allows you to bypass the error by modifying the <em>CleanupState<\/em> registry key.<\/p>\n<\/p>\n<ol>\n<li>Launch the <strong>Registry Editor<\/strong> with admin rights.<\/li>\n<li>Go to <strong>HKEY_LOCAL_MACHINESYSTEMSetupSysprepStatus<\/strong>.<\/li>\n<li>Right-click on the <strong>CleanupState<\/strong> key and alter the key to value <strong>2<\/strong>.<\/li>\n<li>Right-click on the <strong>GeneralizationState<\/strong> key in registry and click the <strong>Edit<\/strong> option.<\/li>\n<li>If <strong>7<\/strong> is not present already, input it and confirm with <strong>OK<\/strong>.<\/li>\n<li>Reboot your Windows system.<\/li>\n<li>Execute Sysprep.<\/li>\n<\/ol>\n<p><p>If you face any other errors when Sysprep fails, please post a comment below.<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this post, you will learn what to do when Sysprep fails and how to fix the error: Sysprep was not able to validate your Windows installation. Sysprep is a built-in Windows tool used to generalize OS images before deploying them to multiple machines. There are several reasons why Sysprep fails, but the error message [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":9223,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[92,111,119],"tags":[],"class_list":["post-9222","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-articles","category-deployment","category-windows"],"_links":{"self":[{"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/posts\/9222","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/comments?post=9222"}],"version-history":[{"count":2,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/posts\/9222\/revisions"}],"predecessor-version":[{"id":10361,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/posts\/9222\/revisions\/10361"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/media\/9223"}],"wp:attachment":[{"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/media?parent=9222"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/categories?post=9222"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/tags?post=9222"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}