How to Fix Sysprep Fatal Error [0x0f0085}, Could not load MSESysprep.dll (Solved)

On a Windows 7 Pro based machine the following error appears when running sysprep: "A fatal error occurred while trying to sysprep the machine".

The sysprep log file (setuperr.log) which is created under C:\Windows\System32\sysprep\Panther folder displays the following error(s): 

" Error [0x0f0085] SYSPRP LaunchDll:Could not load DLL c:\Program Files\Microsoft Security Client\MSESysprep.dll[gle=0x0000007e]

Error [0x0f0070] SYSPRP RunExternalDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 126[gle=0x0000007e]

Error [0x0f00a8] SYSPRP WinMain:Hit failure while processing sysprep cleanup providers; hr = 0x8007007e[gle=0x0000007e] "

After receiving the above error I navigate to "c:\Program Files\Microsoft Security Client" folder but MSESysprep.dll file is missing from there. This could happen because Microsoft Security Essentials client was previously removed from the computer, but an invalid entry still exists in Windows Registry.



To fix the fatal error while trying to run sysprep in a Windows 7  machine follow the steps below:


How to resolve SYSPREP's "Could not load MSESysprep.dll" error.

Step 1: Remove the invalid entry from Windows Registry.

1. Open Windows Registry Editor. To do that:

  1. Press “WindowsImage-201_thumb_thumb_thumb_thumb1_t  + “R” keys to load the Run dialog box.
  2. Type “regedit” and press Enter.


IMPORTANT: Before you continue to modify the registry, first take a registry backup. To do that:

a. From main menu go to File & select Export.
b. Specify a destination location (e.g. your Desktop), give a filename (e.g. “RegistryBackup”) and press Save.

2. Inside Windows Registry, navigate (from the left pane) to this key:




3. Right-click at Cleanup key and select Permissions.



4. Select Administrators and then give Full Control permissions. Press OK when finish.



5. At the right pane, select and then delete the following value:

2D153B43-11B4-461F-AA43-832B2C8B8872   C:\Program Files\Microsoft Security Client\MSESysprep.dll,DllSysprep_Cleanup



6. Close Registry Editor.


Step 2: Remove Sysprep's Panther folder.

1. Open Windows Explorer and navigate to C:\Windows\System32\sysprep\ folder.

2. Delete (or Rename) the Panther folder.




Now run sysprep again. Sysprep should run successfully and without problems.

That's it!

If this article was useful for you, please consider supporting us by making a donation. Even $1 can a make a huge difference for us in our effort to continue to help others while keeping this site free: