Solution 2: Restore Windows Registry to Default Settings
The second step you can do is restore the Windows registry to the default Settings, which are Settings that existed during the first Windows installation. This can help fix any damage or inappropriate changes to the Windows registry that can cause sysprep errors. Here’s how:
- Open PowerShell by pressing Windows + X on the keyboard and select Windows PowerShell (Admin).
- Type the following command to restore the Windows registry to its default Settings, and press Enter.
Get-ChildItem HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep\SetupCl | Remove-ItemProperty -Name DoNotCleanUpNonPresentDevices
- After the command finishes running, try running sysprep again and see if the error still appears.
Solution 3: Reset the Sysprep Number Limitation
The third step you can do is reset the limit on the number of Sysprep that can be done on a single installation of Windows. This can help you if you’ve run Sysprep more than three times and get errors. Here’s how:
- Open Registry Editor by pressing Windows + R on the keyboard, typing regedit, and pressing Enter.
- Locate the following folder in the left pane:
HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus
- Double-click on the CleanupState value on the right pane, and convert the data to 2. Click OK to save your changes.
- Double-click on the GeneralizationState value on the right pane, and change the data to 7. Click OK to save your changes.
- Close Registry Editor and try running sysprep again and see if the error still appears.
Conclusion
Sysprep errors in Windows 11 can be caused by several factors, such as the presence of applications that are not supported by Sysprep, changes to the Windows registry, or a limit on the number of Sysprep that can be done. You can try some of the solutions described above to solve the Sysprep error on Windows 11. Hopefully, this article is useful and can help you in using Sysprep on Windows 11.