Fix: A Fatal Error Occurred While Trying to Sysprep the Machine

Many users are complaining about an error message “A Fatal Error Occurred While Trying to Sysprep the Machine”.  Sysprep stands for System Preparation Tool. Sysprep prepares a Windows installation (Windows client and Windows Server) for imaging, allowing you to capture a customized installation. Sysprep removes PC specific information from a Windows installation, ‘generalizing’ the installation so it can be installed on different PCs. With Sysprep, you can configure the PC to boot to audit mode, where you can make additional changes or updates to your image. This tool is made for system administrators, OEM manufacturers, etc. which you can use to install Windows on multiple computers.

System Prepration Tool - A fatal error occurred while trying to sysprep the machine

Some users encounter a fatal error while trying to run the system preparation tool application. In this article, we will look at some basic details and workarounds for this error.

What are the uses of Sysprep?

Sysprep (System Preparation Tool) is an important component of Microsoft Windows as it participates in cloning, examining, and delivering new installation packages.

Sysprep provides the following features-

  • Removes PC-specific information from the Windows image, including the PC’s security identifier (SID): This allows you to capture the image and apply it to other PCs. This is known as generalizing the PC.
  • Uninstalls PC-specific drivers from the Windows image
  • Prepares the PC for delivery to a customer by setting the PC to boot to OOBE (Out-of-box Experience)
  • Allows you to add answer file settings to an existing installation

What is the cause of this error?

This error is accompanied by the message”

“A fatal error occurred while trying to Sysprep the machine”

Causes of this error:

  1. When you have used the Windows Software Licensing Rearm program more than 3 times in a single Windows image
  2. Corrupted Windows image
  3. Issues with MSDTC (Microsoft Distributed Transaction Coordinator)

Methods for fixing these errors

I have mentioned 5 ways to fix the error code that says “A fatal error occurred while trying to sysprep the machine error” without taking any professional help, let’s begin:

By Editing SkipRearm Key

NOTE: Take a backup of your registry before you make any changes. To make a backup, go to File (located on the top-left in the menu-bar), then click on Export. Export the backup to the desired location.

1. Press Windows + R to open the RUN application

2. Type in ‘regedit’ and then hit the ENTER key to open Registry editor

Open Regedit using Run command button

3. In the Windows Registry Editor, navigate to the following location:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\

4. Locate the SkipRearm key in the right pane

skiprearm

5. Double-Click the SkipRearm key to open its Properties

6. In the Value data field, enter 1 and click OK; Close the registry editor the error should be resolved.

set value to 1

By Editing Generalization State and CleanupState Key

NOTE: Take the backup of this file just like we did before proceeding to the steps in method 1

1. Press Windows + R simultaneously to open the Run application

2. Type in ‘regedit’ and then hit the ENTER key

3. In the Windows Registry Editor, navigate to the following location (or paste the following location in the text field at the top of the Registry Editor application)-

HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus

4. Locate the GeneralizationState key in the right pane & double click to open it

generalization state

 

5. In the Value data field, enter 7 and click OK

6. Now, locate the CleanupState key in the right pane & double click to open it (If you can’t find CleanupState key, skip this and the next step.)

7. In the Value data field, enter 2 and click OK

The error should be resolved, run the Sysprep tool to check.

Uninstall MSDTC and Re-install it

 This issue is very rare. This rare condition occurs when the Sysprep command tries to stop the Microsoft Distributed Transaction Coordinator (MSDTC) service and the VMware tool tries to start the MSDTC service.

1. Open the command prompt as administrator by searching for it in the start menu

Command prompt run as administrator

2. In the command line, type the following command and hit ENTER key-

msdtc -uninstall

3. This service can re-installed by using the following command-

msdtc -install

msdtc install and uninstall

4. Close the command prompt window, check if the error is resolved.

Downloading Microsoft Security Essentials

This fatal error can also be caused due to a missing MSESysprep.dll file. To install it, we need to download and install Microsoft Security Essentials.

1) Go to this official Microsoft link

2) Click on the Download button

3) Choose both the files and click next

installs microsoft security essentials

4. Install both of them and see if the problem persists.

Repairing Windows 10 Image using DISM 

Sometimes by running DISM (Deployment Image Servicing and Management) may fix System Preparation tool error:

1. Open the command prompt as administrator by searching for it in the start menu

2. In the command line, type the following command and hit ENTER key-

DISM/Online/Cleanup-Image/CheckHealth

This command performs a quick check and looks for errors if there is any data that needs to be fixed.

3. In case, if any error/issue is detected, you may run the following command to fix these issues-

DISM/Online/Cleanup-Image/RestoreHealth

4. The process will take several minutes; Check if the problem persists.

Conclusion

All the methods mentioned above are the best possible ways to fix the error. In case you have any queries or suggestions, please leave us a comment below or contact us.

nv-author-image

Bipul

Bipul is an undergraduate engineering student, who has used five different Windows releases over 8 years of him being a true PC enthusiast.

Leave a Reply

Your email address will not be published. Required fields are marked *