none
Sysprep - Fatal error occurred while trying to sysprep the machine

    Question

  •  

    On the 4th attempt to sysprep a Windows 7 Enterprise system, I get the dreaded, 'A fatal error occurred while trying to sysprep the machine.' 

    The setuperr.log shows:
    2010-08-04 13:57:58, Error      [0x0f0073] SYSPRP RunExternalDlls:Not running DLLs; either the machine is in an invalid state or we couldn't update the recorded state, dwRet = 31
    2010-08-04 13:57:58, Error      [0x0f00ae] SYSPRP WinMain:Hit failure while processing sysprep cleanup external providers; hr = 0x8007001f

    I've seen articles referring to the Windows Software Licensing Rearm program may have issues running more than three times in a single Windows image and to add <SkipRearm>1</SkipRearm> in the /unattend file...  but this did not help.  The Windows Media Player Network Sharing Service has also been disabled which is often referred to in other posts.

    The KB article: http://support.microsoft.com/kb/947212/en-us indicated that the resolution is to re-create the image for the machine... This is very frustrating. I'm hoping that there is a better resolution???

    How do you sysprep a machine more than three times to avoid this error?

    Thanks!! 

    930193

    • Edited by rosenstc Wednesday, August 04, 2010 9:17 PM typo
    Wednesday, August 04, 2010 9:15 PM

Answers

  • Hi,

     

    Thanks for posting in Microsoft TechNet forums.

     

    This error shows that sysprep was run multiple times on the machine, please open a command prompt, type: slmgr /dlv to view how many times of remaining Windows Activation count. Generally speaking, to sysprep the image on a single computer for multiple times, you need to configure the Microsoft-Windows-Security-SPP | SkipRearm to 1 in the unattend.xml file. I am assuming whether you configure the Microsoft-Windows-Security-Licensing-SLC | SkipRearm to 1 instead of SPP, the SLC setting is deprecated and should not be used.  

    As a work around of this problem, please type: regedit in the Start Search box to open Registry Editor, set the value of GeneralizationState under HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus to 7, then run sysprep again.

    If the same issue still persists, please unistall the MSDTC and Reinstall it, then try the sysprep.

    To uninstall MSDTC :- msdtc -uninstall

    To reinstall  MSDTC :- msdtc –install

    Best Regards

    Dale Qiao
    TechNet Subscriber Support in forum. If you have any feedback on our support, please contact tngfb@microsoft.com


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”
    • Marked as answer by rosenstc Thursday, August 05, 2010 5:47 PM
    Thursday, August 05, 2010 1:56 AM
    Moderator

All replies

  • Hi,

     

    Thanks for posting in Microsoft TechNet forums.

     

    This error shows that sysprep was run multiple times on the machine, please open a command prompt, type: slmgr /dlv to view how many times of remaining Windows Activation count. Generally speaking, to sysprep the image on a single computer for multiple times, you need to configure the Microsoft-Windows-Security-SPP | SkipRearm to 1 in the unattend.xml file. I am assuming whether you configure the Microsoft-Windows-Security-Licensing-SLC | SkipRearm to 1 instead of SPP, the SLC setting is deprecated and should not be used.  

    As a work around of this problem, please type: regedit in the Start Search box to open Registry Editor, set the value of GeneralizationState under HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus to 7, then run sysprep again.

    If the same issue still persists, please unistall the MSDTC and Reinstall it, then try the sysprep.

    To uninstall MSDTC :- msdtc -uninstall

    To reinstall  MSDTC :- msdtc –install

    Best Regards

    Dale Qiao
    TechNet Subscriber Support in forum. If you have any feedback on our support, please contact tngfb@microsoft.com


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”
    • Marked as answer by rosenstc Thursday, August 05, 2010 5:47 PM
    Thursday, August 05, 2010 1:56 AM
    Moderator
  •  

    Man... you are good!  I had configured Microsoft-Windows-Security-Licensing-SLC rather than Microsoft-Windows-Security-Licensing-SPP in my answer file.  I changed the SkipRearm to 1 for SPP in my answer file.

    The slmgr /div command reported that my remaining windows rearm count: 0.  HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus to was already set to 7.

    I ran SYSPREP again, and it worked!

    Thank you!!

    Chris

    • Edited by rosenstc Thursday, August 05, 2010 5:48 PM typo
    • Proposed as answer by brian l hart Sunday, November 18, 2012 7:14 AM
    Thursday, August 05, 2010 5:47 PM
  • hello dale,

    ive encountered this probelm also but the fix that you gave did not work for me although i had the exact same error as rosentc i ran slmgr /dlv and my rearm count is set to 3. i altered the registry to 7 and retried but no joy. so i unistalled as instructed the msdtc and reinstalled. after doing this the sysprep did run for a much longer period but eventually did return the same error. the image ive build for deployment to my educational environment is approximately 80gb wiht over 60 pieces of software on so startign again isnt really an option as its took me 2 mnth to get everytiing installed and configured to work side by side. ive got both the log files from the panther folder that i could send to you if you could ahve a look and hopefully find a fix for me. thanks
    Wednesday, August 25, 2010 8:14 AM
  • @Dale Thank you! I just spent a few hours overcoming this issue. I have spent the past few weeks building a windows image for my company. Microsoft's recommendation to "rebuild the windows image" is insulting.

    First, I had to reset the number of rearm counts. This forum post has simple instructions for how to do this:

    http://forums.mydigitallife.info/threads/17938-GUIDE-How-to-really-run-Windows-7-forever-without-applying-any-cracks

    I didn't have the "Repair your Computer" option in the advanced boot menu that the instructions mention, but I was able to run the .bat file while booted to a winpe disk, and it worked just as well.

    After that, I was still getting the fatal error message, but once I set SysprepStatus to 7 in the registry, it worked!

    Thanks again.

    Wednesday, December 29, 2010 6:55 AM
  • hello ackas,

    after i've reinstalled msdtc the registry key was set to index 4, i changed it an it works.

    regards form germany

    Thursday, April 28, 2011 12:52 PM
  • Thank you Dale, this is really help

    for a few minutes is working then return the same error msg, i tried to reinstall msdtc but unfort.. nothing happend

    once i run the command, the values of the reg key return to 4 and cleanup state return to 1

    any advise?

     


    Ghaith Mohammad
    Monday, June 06, 2011 2:35 PM
  • Fyi sysprep failed for me once because the hostname was too long.

     

    Monday, June 06, 2011 2:51 PM
  • Hi,

    We stil have an issue with sysprep.
    Registry key is already set to 7, and I'm not sure how to run the uninstall msdtc. Can anyone clear this up for me?

    Are there any other tricks I can try? Rebuilding the image is so not an option !

    Also, we are using an xml on the WDS server with the SkipRearm setting set to 1, which should be correct. right?

    We are a High school in the Netherlands, migrating 500 PC's from XP to Windows 7 Enterprise x64, Server2008 R2.

    Thanks for helping out, anyone!

    Regards, Hans

    Monday, October 10, 2011 11:16 AM
  • ok, I see some are able to work through this, I get the same error but for apparently different reasons.

     

    W7 pro x64, in audit mode

    slmgr /dlv shows that I am in initial grace period with 28 days remaining and my rearm count is 3 so thats not the issue.

    setuperr contains

    2011-12-07 17:54:57, Error      [0x0f0082] SYSPRP LaunchDll:Failure occurred while executing 'drmv2clt.dll,Sysprep', returned error code -2147024864[gle=0x00000020]
    2011-12-07 17:54:57, Error      [0x0f0070] SYSPRP RunExternalDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = -2147024864[gle=0x00000020]
    2011-12-07 17:54:57, Error      [0x0f00a8] SYSPRP WinMain:Hit failure while processing sysprep cleanup providers; hr = 0x80070020[gle=0x00000020]

    this smells like some kind of rights issue.


    that was almost but not quite entirely unlike me
    Thursday, December 08, 2011 2:00 AM
  • econsepts. Do you use more than one OS language?
    Tuesday, January 03, 2012 1:13 PM
  • Hi Dale Qiao,

    Like ackas, this did not completely work for me.  My Windows Activation count is 2, I'm using SPP instead of SLC, I have changed GeneralizationState from 3 to 7, and I have uninstalled then installed MSDTC.  I have done this 4 times with the same 'A fatal error occurred while trying to sysprep the machine.' results. 

    One question came to mind though.  After doing all of this and running sysprep again, should I drop the '/generalize' switch?  In 'sysprep.exe /oobe /generalize /shutdown /unattend:c:\windows\unattend.xml'?

    Cheers!


    • Edited by lcase1 Wednesday, March 07, 2012 3:33 PM
    Wednesday, March 07, 2012 3:17 PM
  • Solution for the sysprep fatal error is to clean partner folder i.e. Go to Sysprerp folder i.e.  c:\windows\system32\sysprep\partner

    Check below guide for more info...

    http://www.vmwareandme.com/2013/10/guide-fatal-error-occurred-while-trying_23.html


    www.vmwareandme.com


    Tuesday, May 15, 2012 6:29 AM
  • Hi, i had the same problem, my rearm count was 3.

    after checking the registry at GeneralizationState underHKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus i found that the value was 4, changed it to 7 and my problem was solved.

    Wednesday, May 23, 2012 4:59 AM
  • What worked for me is:

    Setting HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus to 7

    Setting HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\SkipRearm to 1

    Renaming (or deleting) C:\Windows\System32\sysprep\Panther

    Make sure to do all three each time you attempt a sysprep.

    • Edited by Riffing Thursday, June 07, 2012 6:03 PM
    • Proposed as answer by DOHA-DH Wednesday, September 26, 2012 1:03 PM
    Thursday, May 31, 2012 7:45 PM
  • Hi Riffing

    I have been experiencing issues with Sysprepping a windows machine once sysprepped for quite sometime.

    After reading your post I have applied this on my machine yesterday and works wonders mate.

    I am fairly new to sysprep on Windows 7.

    I just want to know in a nutshell what do all three steps you put in your post do and mean exactly.

    Many thanks

    Tuesday, June 12, 2012 8:14 AM
  • One more thing...

    On my image I have MS Office 2010 using a MAK key.

    How can I activate office 2010 and windows 7 in an unattend.xml file so that before adding the PC to the domain the apps are activated straight away?

    Many thanks

    Tuesday, June 12, 2012 8:18 AM
  • finaly nailed it...thanks a million times.
    Tuesday, June 26, 2012 5:42 AM
  • Hi,

    I've tried everything that you said before but without success. If I type slmgr /dlv, in Rearm count, appears 2. I've tried to change the regedit values that you explained. Could you help me?

    Thanks in advance.

    Regards,

    Monday, July 23, 2012 1:55 PM
  • Riffing...You save my day...thanks
    Monday, September 10, 2012 2:39 PM
  • I did all 3 that riffing mentioned and it worked great.  thank you.
    Tuesday, January 29, 2013 2:44 PM
  • To uninstall MSDTC :- msdtc -uninstall

    To reinstall MSDTC :- msdtc –install

    must both be run as administrator in the command prompt. That helped me greatly.

    Reboot after each running of command prompt.




    • Edited by ChrispyOne Friday, February 22, 2013 9:16 PM i can't soell
    Friday, February 22, 2013 8:58 PM
  • Olá
    Eu tentei de todas as formas só que não está funcionando
    Mesmo fazendo tudo que o Riffing disse não tive sucesso.
    E quando executo o comando msdtc -unistall ou install como administrador não acontece nada.
    Poderiam dizer o que mais posso tentar;

    A mensagem de rearm disse que o limite foi excedido

    Finalmente consegui.

    Obrigado a todos.

    • Edited by StrykerFC Monday, March 04, 2013 6:36 PM
    Monday, March 04, 2013 6:15 PM
  • Hello
    I tried every way just is not working
    Even doing all that riffing said I did not succeed.
    And when I run the command-msdtc unistall or install as administrator nothing happens.
    They could say what else can I try
    The message rearm said the limit was exceeded.

    Finally got it.

    Thank you all.

    • Edited by StrykerFC Monday, March 04, 2013 6:37 PM
    Monday, March 04, 2013 6:16 PM
  • Im having similar problems with different errors.  I have tried all of the above but to no avail.  Incidentally im using spanish on an english os but when i switched to english this didnt matter.

    Heres the error list, any help would be appreciated.

    2013-03-07 12:41:24, Error      [0x0f0082] SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing 'SLReArmWindows' from C:\Windows\System32\slc.dll; dwRet = 0xc004fe00
    2013-03-07 12:41:24, Error                 SYSPRP ActionPlatform::ExecuteAction: Error in executing action; dwRet = 0xc004fe00
    2013-03-07 12:41:24, Error                 SYSPRP ActionPlatform::ExecuteActionList: Error in execute actions; dwRet = 0xc004fe00
    2013-03-07 12:41:24, Error                 SYSPRP SysprepSession::Execute: Error in executing actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0xc004fe00
    2013-03-07 12:41:24, Error                 SYSPRP RunPlatformActions:Failed while executing SysprepSession actions; dwRet = 0xc004fe00
    2013-03-07 12:41:24, Error      [0x0f0070] SYSPRP RunExternalDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0xc004fe00
    2013-03-07 12:41:24, Error      [0x0f00a8] SYSPRP WinMain:Hit failure while processing sysprep generalize internal providers; hr = 0xc004fe00

    All i want to do is keep the image identical but once its put ona  different machine the drivers automatically update, i was thinking of just cloning it and running a repair if thats still possible.

    Peter



    • Edited by Pedronz06 Thursday, March 07, 2013 10:59 PM
    Thursday, March 07, 2013 10:53 PM
  •  I had the same error msg when I tried to Sysprep a Windows 7 / Server 2008 R2 after installed IE 10.

    So, I uninstalled IE 10 and sysprep worked as a charm.

    MARCOS BENITES | TRAX COMPUTER ADVISOR
    Messenger: mbenites@trax.net.br
    Skype: mbenites
    Site: http://www.trax.net.br

     

    MARCOS BENITES | TRAX COMPUTER ADVISOR http://www.trax.net.br | Twitter: http://twitter.com/benitesm Se este post foi útil vote como útil e se foi respondido, finalize.

    Wednesday, March 27, 2013 6:26 PM
  •  I had the same error msg when I tried to Sysprep a Windows 7 / Server 2008 R2 after installed IE 10.

    So, I uninstalled IE 10 and sysprep worked as a charm.

    MARCOS BENITES | TRAX COMPUTER ADVISOR
    Messenger: mbenites@trax.net.br
    Skype: mbenites
    Site: http://www.trax.net.br

     

    MARCOS BENITES | TRAX COMPUTER ADVISOR http://www.trax.net.br | Twitter: http://twitter.com/benitesm Se este post foi útil vote como útil e se foi respondido, finalize.

    It's a bug of updating to IE10.

    Open regedit, HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep

    Set Administrators access permissions on Cleanup, Generalize and Specialize to Full Control

    Then fix the path to IE cleanup libraries in the parameters:

    Cleanup\{EC9FE15D-99DD-4FB9-90D5-5B56E42A0F80}

    From C:\Windows\SysWOW64\iesysprep.dll,Sysprep_Cleanup_IE to C:\Windows\System32\iesysprep.dll,Sysprep_Cleanup_IE

    Generalize\{EC9FE15D-99DD-4FB9-90D5-CE53C91AB9A1}

    Change SysWOW64 to System32

    and finally in Specialize\{EC9FE15D-99DD-4FB9-90D5-676C338DC1DA} do the same thing

    Enjoy!



    • Edited by Alexey Makarov Wednesday, May 15, 2013 3:20 PM Typos
    • Proposed as answer by tiberious Thursday, July 25, 2013 5:25 PM
    Wednesday, May 15, 2013 3:17 PM
  • This worked for me.  I changed the reg key and tried sysprep but it failed. I went back and checked the key and it changed back to 3. I changed it once again and then ran the msdtc -uninstall and the msdtc -install commands. I tried sysprep again and it worked.

    After this post I went through the process again and it didn't work as stated above. This time I had to do the following to get sysprep to work. I did all of the following and then ran sysprep.

    - Set GeneralizationState to 7 in HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus

    - Set SkipRearm to 1 in HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform

    - Run msdtc -uninstall

    - Run msdtc -install

    I did all this once and then it still failed. I went back into the registry and check the GeneralizationState key. It changed to 4. I changed it back to 7 and did all the steps again.

    I ran sysprep and it completed without any errors.

    Hope this helps

    -Joe

    • Edited by stracjd Tuesday, May 21, 2013 6:15 PM Correction
    • Proposed as answer by VTechie Tuesday, June 10, 2014 8:40 PM
    Tuesday, May 21, 2013 2:09 PM
  •  I had the same error msg when I tried to Sysprep a Windows 7 / Server 2008 R2 after installed IE 10.

    So, I uninstalled IE 10 and sysprep worked as a charm.

    MARCOS BENITES | TRAX COMPUTER ADVISOR
    Messenger: mbenites@trax.net.br
    Skype: mbenites
    Site: http://www.trax.net.br

     

    MARCOS BENITES | TRAX COMPUTER ADVISOR http://www.trax.net.br | Twitter: http://twitter.com/benitesm Se este post foi útil vote como útil e se foi respondido, finalize.

    It's a bug of updating to IE10.

    Open regedit, HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep

    Set Administrators access permissions on Cleanup, Generalize and Specialize to Full Control

    Then fix the path to IE cleanup libraries in the parameters:

    Cleanup\{EC9FE15D-99DD-4FB9-90D5-5B56E42A0F80}

    From C:\Windows\SysWOW64\iesysprep.dll,Sysprep_Cleanup_IE to C:\Windows\System32\iesysprep.dll,Sysprep_Cleanup_IE

    Generalize\{EC9FE15D-99DD-4FB9-90D5-CE53C91AB9A1}

    Change SysWOW64 to System32

    and finally in Specialize\{EC9FE15D-99DD-4FB9-90D5-676C338DC1DA} do the same thing

    Enjoy!



    This was especially helpful. My rearm count was already 1, so that wasn't my issue, but I tried those steps anyways. I am glad I keep reading this thread! I would never have figured this out on my own!

    Thanks again!

    Friday, May 24, 2013 3:55 PM
  • I tried these steps multiple times and it continues to crash on me. I can't get it to work. This is only the second time I have run sysprep on this particular image. I'm doing everything everyone here is telling me to do and it just doesn't work.

    This is Windows Server 2008.

    I've had ample success with Windows Server 2012 sys-prepping over and over again and I'm using the same unattend.xml file.

    Anyway, this is utterly frustrating and I'm stuck as of right now.

    Friday, May 31, 2013 4:43 AM
  • i try all but the sysprep goes always in fatal error 

    Error      [0x0f0082] SYSPRP LaunchDll:Failure occurred while executing 'drmv2clt.dll,Sysprep', returned error code -2147024864[gle=0x00000020]
    Error      [0x0f0070] SYSPRP RunExternalDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = -2147024864[gle=0x00000020]
    Error      [0x0f00a8] SYSPRP WinMain:Hit failure while processing sysprep cleanup providers; hr = 0x80070020[gle=0x00000020]

    -

    IE stays in Sys32, 

    Setting HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus to 7

    Setting HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\SkipRearm to 1

    Renaming (or deleting) C:\Windows\System32\sysprep\Panther

    I can not run - msdtc -uninstall or - msdtc –install !

    Thanks for help

    Tuesday, July 02, 2013 11:39 AM
  • I just found the solution for this problem System Windows 7 Professional 64 bit, on Dell Latitude Ultra-book I tried many of the suggested solutions to no avail. Then I learned how to find the error log (c:\windows\system32\systemprep\panther\ the error log is in this folder) Based on this I found that is was a Digital Rights Management (DRM) issue. I turned off the Windows Media Player sharing option using a How-To-Geek page found here http://bit.ly/2hiNlL After doing this I was able to preform a successful sysprep! Hope this is helpful for others as well.
    • Proposed as answer by mohaltron Tuesday, September 10, 2013 9:50 PM
    Sunday, July 07, 2013 2:50 AM
  • Nothing worked until I read your post. Setting the SkipRearm to 1 was the ticket.

    Thanks Joe

    Thursday, July 11, 2013 7:38 PM
  • Nothing worked until I read your post. Changing SkipRearm to 1 was the ticket.

    Thanks Joe

    Thursday, July 11, 2013 7:46 PM
  • all 3 together worked like a Charm :)

    Thanks a lot Riffing!

    Saturday, July 13, 2013 11:43 PM
  • This worked, thanks so much!  This is the only place where I was able to find this solution; again, thank you!
    Wednesday, July 17, 2013 10:43 PM
  • neoTech123:

    Thank you so much! I had tried everything else in this forum (and a few others) last night before giving this a shot. Although I could not find where to turn the WMP sharing option off (my WMP window looked different from the two options posted in your link for whatever reason), I killed it in Task Manager and rebooted before it had time to rear its ugly head again. I have to add that this was a used-but-formatted PC I had just bought off a guy through Craigslist, and he was telling me to clean install Windows (yikes!). Thank you again! Great advice!

    Thursday, July 18, 2013 11:05 PM
  • Yes indeed...yet another curse if IE 10!  Super bad timing for MS to release IE10 and W8 in the same year.  I hope they can get back on track with Blue.  I've tried everything in this post up to this and this solved the issue.  Thanks!  I must add...how the heck did you figure that out?!? - not really wanting an answer obviously.
    • Proposed as answer by Jandis Tuesday, August 06, 2013 8:04 AM
    Thursday, July 25, 2013 5:28 PM
  • Hi and thx. i tryed all the solutions but only uninstalling ie 10 did the trick.

    u will find it in the control panel under add remove programs turn windows features on or off.

    Thanks too all.

    Best Regards Jandis

    Tuesday, August 06, 2013 8:11 AM
  • Many Thanks, The solutions in this thread sorted out my issues as well. bookmarked for future use :)

    Wednesday, August 07, 2013 11:07 AM
  • For anyone else with this issue... if you are running a virtual machine in VMware, take a look at this KB:  http://support.microsoft.com/kb/2693187/en-us

    There is a hotfix to resolve the issue with MSDTC and VMware Tools interactions.

    I got this in my setuperr.txt log:

    [0x0f0082] SYSPRP LaunchDll:Failure occurred while executing 'C:\Windows\system32\msdtcprx.dll,SysPrepDtcCleanup', returned error code -2147024864[gle=0x000000b7]
    [0x0f0070] SYSPRP RunExternalDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = -2147024864[gle=0x000000b7]
    [0x0f00a8] SYSPRP WinMain:Hit failure while processing sysprep cleanup providers; hr = 0x80070020[gle=0x000000b7]

    Using the KB hotfix, I was able to successfully sysprep my machine.  Hope this helps for anyone finding this article.
    Monday, August 12, 2013 6:13 PM
    • Clear the Panther Folder
    • Set HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus to 7
    • Deinstall IE 10
    • Run sysprep again as Admin

    Finally worked


    • Edited by Merlin Huber Thursday, August 15, 2013 2:49 PM
    • Proposed as answer by Merlin Huber Wednesday, March 05, 2014 8:11 AM
    Thursday, August 15, 2013 2:48 PM
  • Thanks Alexey, your solution was spot on!

    Jay Valambhia | www.netflo.co.uk

    Friday, August 30, 2013 2:19 PM
  • I just found the solution for this problem System Windows 7 Professional 64 bit, on Dell Latitude Ultra-book I tried many of the suggested solutions to no avail. Then I learned how to find the error log (c:\windows\system32\systemprep\panther\ the error log is in this folder) Based on this I found that is was a Digital Rights Management (DRM) issue. I turned off the Windows Media Player sharing option using a How-To-Geek page found here http://bit.ly/2hiNlL After doing this I was able to preform a successful sysprep! Hope this is helpful for others as well.

     worked correctly for me!!

    recommend to follow the link kroliki.in.ua

    • Edited by mohaltron Tuesday, September 10, 2013 9:58 PM add a link
    Tuesday, September 10, 2013 9:57 PM
  • Just get kinda same error. than read line by line log file in c:\windows\system32\sysprep\partner. Find out there some Microsoft Security Clinet related DLL mentioned. Copied dll's name and search registry. There some keys what Sysprep has to check and clean. one of keys got this dll. But I just uninstall MS antivirus so, after a delete the key and run again it works fine.

    Anyway, Thank you All!

    Monday, September 16, 2013 2:24 AM
  • Killing the dang "Windows Media Player Network Sharing Service" resolved it for me. Thanks!
    Saturday, September 28, 2013 5:21 AM
  • I just found the solution for this problem System Windows 7 Professional 64 bit, on Dell Latitude Ultra-book I tried many of the suggested solutions to no avail. Then I learned how to find the error log (c:\windows\system32\systemprep\panther\ the error log is in this folder) Based on this I found that is was a Digital Rights Management (DRM) issue. I turned off the Windows Media Player sharing option using a How-To-Geek page found here http://bit.ly/2hiNlL After doing this I was able to preform a successful sysprep! Hope this is helpful for others as well.
    Dude, you truly a lifesaver. Turning off the WMP sharing service finally saved my day though I still got no idea how this service impacts on sysprep.

    Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.


    Friday, October 11, 2013 3:49 AM
  • Thanks, after trying multiple suggestions in here, yours did it for me!
    Monday, October 14, 2013 7:18 PM
  • I just found the solution for this problem System Windows 7 Professional 64 bit, on Dell Latitude Ultra-book I tried many of the suggested solutions to no avail. Then I learned how to find the error log (c:\windows\system32\systemprep\panther\ the error log is in this folder) Based on this I found that is was a Digital Rights Management (DRM) issue. I turned off the Windows Media Player sharing option using a How-To-Geek page found here http://bit.ly/2hiNlL After doing this I was able to preform a successful sysprep! Hope this is helpful for others as well.

    None of the suggested solutions resolved my issue but the above-mentioned error logs allowed me to determine that my issue was related to an installation of Microsoft Security Essentials that I had uninstalled.

    There was a registry entry left in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep\Cleanup that referred to the now-nonexistant MSE install.  

    Like the IE10 bug mentioned earlier, there were permissions issues on all of the HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep sub-keys.  

    The resolution was to force the permissions of HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep to all the child keys, and then remove the errant MSE reference from the Cleanup key.

    Wednesday, November 06, 2013 10:02 PM
  • Make sure Microsoft Security Essentials is installed.

    Cheers.
    Friday, November 15, 2013 9:42 PM
  • This helped. Thanks...

    Wednesday, January 08, 2014 1:53 PM
  • Thank you sir!!!!!! You are awesome, this is what had me stumped. I found the registry entry left in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep\Cleanup that referred to the now-nonexistant MSE install.  Thanks...
    Tuesday, January 28, 2014 3:11 PM
  • Thank you very much for this.

    I set the SysprepStatus to 7 but that didn't work.

    So I proceeded To uninstall and reinstall MSDTC which totally worked.

    So happy now!

    Friday, March 07, 2014 7:01 PM
  • Can you be really specific with what you mean by 'configure microsoft-windows-security-licensing-SPP| skiprearm to 1'? Could you give a step by step guide? I'm on windows 2008r2.

    Thanks

    Wednesday, March 19, 2014 10:36 PM
  • Use Below link to get resolve the Fatal Error issue while sysprep the machine

    http://answers-free.blogspot.in/2014/04/a-fatal-error-has-occurred-while-trying.html


    Tuesday, April 01, 2014 5:27 AM
  • Use Below link to get resolve the Fatal Error issue while sysprep the machine

    http://answers-free.blogspot.in/2014/04/a-fatal-error-has-occurred-while-trying.html

    Tuesday, April 01, 2014 5:29 AM
  • Use Below link to get resolve the Fatal Error issue while sysprep the machine

    http://answers-free.blogspot.in/2014/04/a-fatal-error-has-occurred-while-trying.html

    Tuesday, April 01, 2014 5:29 AM
  • Thanks Dale, This resolved my issue as well.

    Monday, May 05, 2014 4:21 AM
  • I uninstalled Microsoft Security Essentials between different images and sysprep had an issue with that.  Once I reinstalled MSE, it ran as expected.
    Wednesday, May 14, 2014 8:36 PM
  • Thank you neoTech123. I had a Dell Latitude E6510 and none of the preceding "fixes" worked for me. Yours did. I just had to disable the Windows Media Sharing service and the sysprep ran great. Thank you for this information.
    Monday, May 19, 2014 9:02 PM
  • The registry key fix worked for me.

    In my case, I was sysprep-ing the machine in VMware when my host system crashed.  Got everything back up and running to include the virtual machine.  As soon as I got everything running, I attempted a sysprep and it immediately failed with a fatal error.  Read through the responses and checked my situation.

    1) Rearm count=Good (3)

    2) Registry Key=Bad (3)

    Reset the registry key back to (7) and re-ran sysprep while typing out this entry.  Since VMware shows the system as shutdown, it appears all is well.  Adding my vote to this answer

    Mahalo,

    Charlie

    Wednesday, May 21, 2014 2:27 AM
  • This worked like a charm on my Windows template in VMware. Once we deploy from this template and create a new machine, do we need to go into the registry and change anything back? I read that KMS has issues with counting systems.
    Friday, May 23, 2014 5:39 PM
  • I just found the solution for this problem System Windows 7 Professional 64 bit, on Dell Latitude Ultra-book I tried many of the suggested solutions to no avail. Then I learned how to find the error log (c:\windows\system32\systemprep\panther\ the error log is in this folder) Based on this I found that is was a Digital Rights Management (DRM) issue. I turned off the Windows Media Player sharing option using a How-To-Geek page found here http://bit.ly/2hiNlL After doing this I was able to preform a successful sysprep! Hope this is helpful for others as well.

    None of the suggested solutions resolved my issue but the above-mentioned error logs allowed me to determine that my issue was related to an installation of Microsoft Security Essentials that I had uninstalled.

    There was a registry entry left in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep\Cleanup that referred to the now-nonexistant MSE install.  

    Like the IE10 bug mentioned earlier, there were permissions issues on all of the HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep sub-keys.  

    The resolution was to force the permissions of HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep to all the child keys, and then remove the errant MSE reference from the Cleanup key.

    this worked for me, turned off the windows media service, and forced the permissions.

    (at this stage i had carried out the steps at the start of the thread. )

    (i didnt have to uninstall IE 11.)

    thanks

    Thursday, May 29, 2014 1:21 PM
  • That one worked for me, thanks!
    Thursday, May 29, 2014 2:53 PM
  • Well known issue.
    Click Start > Run, type Services.msc to
    open the Services applet.
    Scroll down to Windows Media Player
    Network Sharing Service, double click it, change the Startup type to Disabled.
    Click OK.

    Rerun sysprep.
    • Proposed as answer by TonyMartinTony Thursday, January 14, 2016 4:45 PM
    Tuesday, June 10, 2014 10:06 AM
  • I did all of rippin's suggestions which worked for me. I would like to add that it didn't work until I disjoined the machine from the domain. After I disjoined it to the domain, I restarted and then I deleted the panther folder, set the rearm to 1, and set the other value to 7.

    Thanks everyone! Hopefully this helps some others that had the same issue I was having.

    • Proposed as answer by BigMeanie Thursday, June 19, 2014 10:15 PM
    Thursday, June 19, 2014 10:15 PM
  • this is exactly what i just ran into, you are a god send!!!!

    Tuesday, July 15, 2014 12:31 AM
    • Clear the Panther Folder
    • Set HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus to 7
    • Deinstall IE 10
    • Click Start > Run, type Services.msc open the Services applet.
      Scroll down to Windows Media Player Network Sharing Service, double click it, change the Startup type to Disabled.
      STOP the service then Click OK.
    • Run sysprep again as Admin

    Finally after all of this it works

    • Proposed as answer by Mvp77 Monday, February 16, 2015 6:54 PM
    Tuesday, July 15, 2014 2:07 AM
  • This worked perfectly for me on Windows 8.1 as well.

    Thank you!

    Friday, July 18, 2014 6:33 PM
  • my decision was so

     Set GeneralizationState to 7 in HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus

    and I changed all regional settings on en-us

    because folder of sysprep contains only folder - "en-US" 
    C:\Windows\System32\sysprep\en-US

    and I thought that it may be important 

    and after that I restarted my PC and then sysprep was working correct 

    Friday, August 08, 2014 2:08 PM
  • I have fought with this sysprep several times and not found any help online.  I tried something new today and it worked with not problem.  I ran sysprep from safe mode and it ran fine.  I ran through oobe and tried to run again from normal mode and of course had error again.  Went back to safe mode and it ran fine from there a second time.  Computer is ready to go out to customer now.

    I will be trying this again next time we have a sysprep issue here.  Would love to hear back if this works for others.

    Monday, August 11, 2014 8:24 PM
  • I foolishly started at the top of the thread, so have been verifying the registry edits, but did this inspite of upgrading to IE11, and it worked flawlessly.  So yet another vote for resolution! Thanks!
    Tuesday, August 26, 2014 8:18 PM
  • What worked for me is:

    Setting HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus to 7

    Setting HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\SkipRearm to 1

    Renaming (or deleting) C:\Windows\System32\sysprep\Panther

    Make sure to do all three each time you attempt a sysprep.

    Good work!

    This is the one that worked for me! 

    2008 R2 running on VMWare.


    Phil L

    Friday, September 05, 2014 12:06 PM
  • I was able to revert back to a previous sysprep'd machine. None of the solutions worked here.

    So before you enter the computer name for the newly imaged sysprep'd machine, i re-entered into Audit mode (ctrl+shift+F3), made the changes and re sysprepped again and that WORKED!!!

    • Proposed as answer by Yusuf188 Thursday, September 11, 2014 9:41 AM
    Thursday, September 11, 2014 9:40 AM
  • I just found the solution for this problem System Windows 7 Professional 64 bit, on Dell Latitude Ultra-book I tried many of the suggested solutions to no avail. Then I learned how to find the error log (c:\windows\system32\systemprep\panther\ the error log is in this folder) Based on this I found that is was a Digital Rights Management (DRM) issue. I turned off the Windows Media Player sharing option using a How-To-Geek page found here http://bit.ly/2hiNlL After doing this I was able to preform a successful sysprep! Hope this is helpful for others as well.

    Thank you, this was the missing piece that made things work for me.
    Sunday, October 05, 2014 12:34 AM
  • this worked for me, however I had to activate my license first.
    Friday, October 10, 2014 5:29 PM
  • Obrigado! Sua ajuda bateu em cheio em que eu precisava, aliás todos estão muito repetitivos, mas no meu caso resolveu 100%.

    Muito obrigado!!!

    Tuesday, December 02, 2014 5:42 PM
  • I had a problem Where Runing slmgr /dlv returned 0 and could not sysprep a 32 bit Win 7 Installed on C:drive

    Here is what I did to succeed whit Sysprep.

    Disable UAC

    Based on This :

    open notepad and copy paste the following:


    @ECHO OFF
    setLocal Enabledelayedexpansion
    for %%d in (c d e f g h i j k l m n o p q r s t u v w x y z) do (
      if exist %%d:\windows\system32 (
         SET drv1=%%d:\windows\system32
        reg load HKLM\MY_SYSTEM !drv1!
        reg delete HKLM\MY_SYSTEM\WPA /f
        reg unload HKLM\MY_SYSTEM
        GOTO END
      )
    )
    :END
    ECHO Done, Rebooting system...
    timeout 3
    wpeutil reboot

    Then in notepad chose file>save as, in File Type select "All Files", name it "c:\reset.bat"

    Reboot Your Pc, after bios screen press F8, Select "Repair Your Computer", select your keyboard layout, enter your credentials if needed,

    then select the last option "Open Command Prompt"

    type "c:\reset.bat" or "d:\reset.bat" (Sometimes Your Windows Partition get a different letter on the repair environment)

    Back on Windows follow step five if needed.

    Check under slmgr /dlv you have more than 0 under "Remaining Windows Rearm count"

    Download pstools.zip from here, extract content an copy psexec.exe to %windir%\System32

    run psexec.exe and accept the license agreement so it won't bother when running afterwards, close it.

    open notepad and copy paste the following:

    @ECHO OFF
    echo Stopping Windows Media Player Sharing Service..
    echo.
    net stop wmpnetworksvc
    echo.
    echo Deleting Old Sysprep Logs...
    echo.
    del /f /s /q %windir%\System32\sysprep\panther\*.*
    echo.
    echo Adding Required Sysprep Registry Keys...
    echo.
    REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v SkipRearm /t REG_DWORD /d 00000001 /f
    REG ADD HKLM\SYSTEM\Setup\Status\SysprepStatus /v GeneralizationState /t REG_DWORD /d 00000007 /f
    REG ADD HKLM\SYSTEM\Setup\Status\SysprepStatus /v CleanupState /t REG_DWORD /d 00000002 /f
    psexec -i -s REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep\Cleanup /v "{EC9FE15D-99DD-4FB9-90D5-5B56E42A0F80}" /t REG_SZ /d "C:\\Windows\\System32\\iesysprep.dll,Sysprep_Cleanup_IE" /f
    psexec -i -s REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep\Generalize /v "{EC9FE15D-99DD-4FB9-90D5-CE53C91AB9A1}" /t REG_SZ /d "C:\\Windows\\System32\\iesysprep.dll,Sysprep_Cleanup_IE" /f
    psexec -i -s REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep\Specialize /v "{EC9FE15D-99DD-4FB9-90D5-676C338DC1DA}" /t REG_SZ /d "C:\\Windows\\System32\\iesysprep.dll,Sysprep_Cleanup_IE" /f
    echo.
    echo Uninstalling MSDTC...
    echo.
    msdtc -uninstall
    timeout 10
    echo.
    echo Reinstalling MSDTC...
    echo.
    msdtc -install
    timeout 10
    echo.
    echo Cross Your Fingers, Finally Running Sysprep...
    echo.
    %windir%\System32\sysprep\sysprep /generalize /oobe /shutdown /unattend:unattend.xml

    Change Last Line to suit your needs, ie: if you are not using an unnattend answer file, then delete /unattend:unattend.xml"
    Then in notepad chose file>save as, in File Type select "All Files", name it "%windir%\System32\do.cmd"
    if you use an unattend.xml file copy it to %windir%\System32\sysprep folder.
    Once you are ready run %windir%\System32\do.cmd

    Hope it helps,




    • Edited by Alon.or Thursday, February 05, 2015 9:52 AM
    Thursday, February 05, 2015 9:40 AM
  • This fixed the problem for me.  I had specifically removed MSE because I am using another AV solution and didn't want the software cluttering up my pristine image.  Little did I know...   Thanks for the tip!
    Friday, February 06, 2015 7:31 PM
  • hi

    please help

    this did not work for me. I set Microsfot-Windows-Security-SPP|SkipRearm to 1  in the OOBEunattened.xml. 

    should I add it to the wds answer file or to the install image answer file ?  
    ِ

    Monday, February 09, 2015 8:00 PM
  • Thanks.  This worked great!
    Wednesday, March 25, 2015 9:10 PM
  • Alon.or, thanks for this script. Works great.

    Here is my version below.

    Changes:

    1.) Verify user is admin.

    2.) Use pushd to support network path.

    3.) Use "psexec -accepteula" so user does NOT have to accept the EULA.

    4.) Your reg fixes had double slash "\\" in file path, should only be one slash "\". Otherwise path is broken and SysPrep fails.

    5.) Add ">NUL 2>NUL" to stop un-important errors/warnings from printing on screen.

    6.) Deleted "{68595905-7ae9-f26e-af73-72df2987e480}" registry key from "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep\Generalize" as it was causing SysPrep to fail every time. No idea what this reg entry really does. Does NOT seem to have broken anything on image install.

    I figured out that this registry entry was causing my issues by examining logs @ "%windir%\System32\sysprep\panther".

    Enjoy,

    Will

    The script:

    @ECHO OFF
    
    GoTo FixPath
    
    :Author
    REM "CREATED BY WILL“
    REM “10 JUNE 2015”
    REM “BASED ON SCRIPT BY ALON.OR AT https://social.technet.microsoft.com/Forums/windows/en-US/425bd101-8a87-488c-b2e2-9f2f8113a0d9/sysprep-fatal-error-occurred-while-trying-to-sysprep-the-machine?forum=w7itproinstall”
    
    :Requires
    REM This Script Requires psexec From https://technet.microsoft.com/en-us/sysinternals/bb897553.aspx
    REM Simply Drop psexec In The Path Stated Below
    
    :FixPath
    REM "Change Directory To Virtual Drive As CMD Does NOT Support UNC Paths
    REM Set This Path To Where This Script And psexec Is Located
    pushd "\\Imaging\Windows 7\SysPrep"
    cls
    
    TITLE SysPrep - Shutdown
    Color FC
    echo PLEASE READ ALL THE INSTRUCTIONS!
    echo.
    echo This process can take up to 5 minutes. Please be patient.
    echo.
    echo DO NOT CLOSE THIS WINDOW OR SHUTDOWN THE COMPUTER DURING THIS PROCESS!
    echo.
    echo YOUR COMPUTER WILL AUTOMATICALLY SHUT-DOWN ONCE SYSPREP FINISHES
    echo.
    
    echo **************Preparing Computer For SysPrep******************
    echo.
    
    REM Verify The User Has Admin Rights
    "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" >nul 2>&1
    if errorlevel 1 echo *** ERROR: SysPrep Requires Admin Rights *** && echo. && pause && exit
    
    REM Stop Windows Media Player Sharing Service - Known To Cause Major SysPrep Issues
    echo Stopping Windows Media Player Sharing Service
    echo.
    net stop wmpnetworksvc >NUL  2>NUL
    echo.
    
    REM Lets Get Clean SysPrep Logs In Case Something Goes Wrong
    echo Deleting Old Sysprep Logs
    echo.
    del /f /s /q %windir%\System32\sysprep\panther\*.* >NUL  2>NUL
    echo.
    
    REM Fix Known Registry Problems
    echo Adding Required SysPrep Registry Keys
    echo.
    
    REM Do NOT Try and Rearm Windows Activation
    REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v SkipRearm /t REG_DWORD /d 00000001 /f >NUL  2>NUL
    
    REM GeneralizationState Must Be Set To Value Of 7
    REG ADD HKLM\SYSTEM\Setup\Status\SysprepStatus /v GeneralizationState /t REG_DWORD /d 00000007 /f >NUL  2>NUL
    
    REM CleanUpState Must Be Set To Value Of 2
    REG ADD HKLM\SYSTEM\Setup\Status\SysprepStatus /v CleanupState /t REG_DWORD /d 00000002 /f >NUL  2>NUL
    
    REM WorkAround Known IE Bug - Repair Bad Paths
    psexec -accepteula -i -s REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep\Cleanup /v "{EC9FE15D-99DD-4FB9-90D5-5B56E42A0F80}" /t REG_SZ /d "C:\Windows\System32\iesysprep.dll,Sysprep_Cleanup_IE" /f >NUL  2>NUL
    psexec -accepteula -i -s REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep\Generalize /v "{EC9FE15D-99DD-4FB9-90D5-CE53C91AB9A1}" /t REG_SZ /d "C:\Windows\System32\iesysprep.dll,Sysprep_Cleanup_IE" /f >NUL  2>NUL
    psexec -accepteula -i -s REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep\Specialize /v "{EC9FE15D-99DD-4FB9-90D5-676C338DC1DA}" /t REG_SZ /d "C:\Windows\System32\iesysprep.dll,Sysprep_Cleanup_IE" /f >NUL  2>NUL
    
    REM Not Sure What This Key Does But It Was Causing SysPrep To Fail - Check Logs In “%windir%\System32\sysprep\panther”
    psexec -accepteula -i -s REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep\Generalize /v "{68595905-7ae9-f26e-af73-72df2987e480}" /f >NUL  2>NUL
    
    REM Reinstalling Microsoft Distributed Transaction Coordinator As It’s Known To Cause A Major Problem While Trying To SysPrep
    echo.
    echo Uninstalling MSDTC...
    echo.
    msdtc -uninstall >NUL  2>NUL
    timeout 5
    echo.
    echo Reinstalling MSDTC...
    echo.
    msdtc -install >NUL  2>NUL
    timeout 5
    echo.
    echo Running SysPrep
    echo.
    %windir%\System32\sysprep\sysprep /generalize /oobe /shutdown >NUL  2>NUL
    exit
    • Proposed as answer by Tofof Monday, December 26, 2016 9:26 PM
    Wednesday, June 10, 2015 4:42 PM
  • Hi Rosenstc,

    Today i got this problem. Can you please guide me step by step where did you update the SkipRearm to 1 and rest of the process. Thanks in advance.

    Friday, July 31, 2015 11:46 AM
  • Just as a general reply to this thread I thought I would add this to the top.

    I have had many issue with sysprep and the fixed listed below are the best to try as they generally fix all sysprep issue.

    But this has not been covered. If you have installed drivers ( video for example ) and have not reboot the system sysprep will fail fail fail no matter what you do.

    reboot and let the driver load then try sysprep

    As well you do not need to generalize until the last shutdown/reboot

    Wednesday, August 12, 2015 8:41 PM
  • Riffing, you are my hero of the day. :-)
    Tuesday, September 15, 2015 12:57 PM
  • Actually the most relevant answer in my case was Richard Kreider's.

    But it didn't solve all of the problem I was having. So I redid my install step by step.

    Saving a copy of the vBox image and syspreping after each step...

    FINALLY, I found the culprit...

    Final word is : Installing a language pack is ok, as long as you don't try it out before syspreping.

    Sunday, October 11, 2015 3:33 PM
  • @Riffing:  This may be an old post but it has legs! Worked like 1-2-3 after much trial and error and frustration. Thanks.

    Wednesday, January 13, 2016 4:53 PM
  • Thankzzz a lot, it work for me, all the above failed and after disabled WMPlayer NT sharing service and change value from 4 to Setting HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus to 7
    Thursday, January 14, 2016 4:45 PM
  • Create a new user and add it to the Administrators group.

    Restart and login with the newly created user.

    Delete the old user from Control Panel-System-Advanced System Settings-User Profiles-Settings.

    An error should occur while the profile is not deleted completely.

    Proceed with Sysprep.


    Dan Visan

    Saturday, February 13, 2016 7:05 PM
  • Hi, I know this is an old article and has already been answered I just thought I'd post my solution to this issue. My company tasked me with imaging many machines and this saves lots of time.  Just copy the below text to a batch file and just run it as administrator.

    ::  Script to get around Sysprep fatal error when using an OEM system more than 3 times.
    ::  Joe Kelly
    ::  02/02/2016

    :: Steps compiled from http://www.vmwareandme.com/2013/10/guide-fatal-error-occurred-while-trying_23.html

    :: Batch file should be: Run as Administror

    ::Delete all files in the Panther directory without prompting.
    del c:\windows\system32\sysprep\Panther\*.* /f /q

    ::Set the GeneralizationState to 7
    reg add HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus /v GeneralizationState /t REG_DWORD /d 7 /f

    ::Remove the MSDTC and add it back
    msdtc -uninstall
    msdtc -install

    ::Tell Windows not to check license status during sysprep.
    reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v SkipRearm /t REG_DWORD /d 1 /f

    ::Start sysprep
    c:\windows\system32\sysprep\sysprep.exe

    Monday, February 22, 2016 5:26 PM
  • What worked for me is:

    Setting HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus to 7

    Setting HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\SkipRearm to 1

    Renaming (or deleting) C:\Windows\System32\sysprep\Panther

    Make sure to do all three each time you attempt a sysprep.

    Thanks man, doing the first two without renaming/deleting the Panther folder worked for me. 
    Thursday, March 24, 2016 9:59 PM
  • Indeed, I ran all other suggestions and nothing worked. I ended up running net stop WMPNetworkSvc"  and it worked like a charm"

    Saturday, March 26, 2016 8:42 PM
  • Hi,

    This error may occur if the Windows Software Licensing Rearm program has run more than three times in a single Windows image.

    Below Solution worked for me.

    Include the below line in unattend.xml file in GENERALIZE tag

    <settings pass="generalize">
            <component name="Microsoft-Windows-Security-Licensing-SLC" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <SkipRearm>1</SkipRearm>
            </component>
    </settings>

    Also look for the below line in unattend.xml file in OOBESYSTEM tag and make sure that value is not encrypted

      <UserAccounts>

    <AdministratorPassword>
    <Value>Password</Value>
    <PlainText>True</PlainText>
    </AdministratorPassword>
     </UserAccounts>

    Navigate to “HKLM\SYSTEM\Setup\Status\SysprepStatus” in registry and change the GeneralizationState from 3 to 7.

    Reboot the server and run the below command in elevation mode.

    Sysprep.exe /oobe /generalize /reboot /unattend:unattend.xml

    PS: Check for the error message in c:\windows\system32\sysprep\Panther\setuperr.log if there is any error based on cleanup then Navigate to below path in Registry and delete the respective key

    HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep\Cleanup

    Hope this will resolve the issue.




    Syed


    Monday, April 04, 2016 10:22 AM
  • Excellent Batch file!  This forum holds the most useful information regarding sysprep failures.  Here's an addendum, as a new issue has surfaced exhibiting the same symptoms in regards to Windows Management Framework 5.0 (WMF5).  Details here.  Specifically, after installing WMF5 on a Windows 7/2008 R2 system, sysprep will fail because it is looking to delete a particular Registry key during the Generalize phase, but if that key isn't present the process will crash - a silly oversight, as this should be a non-fatal error.

    Error Code:

    Sysprep_Generalize_MiStreamProv: RegDeleteValue for target uri failed with  error = 2[gle=0x00000002]
      Sysprep_Generalize_MiStreamProv: RegDeleteValue for full payload time failed  with error = 2[gle=0x00000002]

    If this is exactly your issue, adding this one Registry key will allow sysprep to succeed next time around (without having to uninstall WMF5):

    REG ADD HKLM\SOFTWARE\Microsoft\Windows\StreamProvider /v "LastFullPayloadTime" /t REG_DWORD /d "0" /f

    Or to include it in the Batch file above (the last line is what's added):

    REM WorkAround Known IE Bug and WMF5 Bug - Repair Bad Paths
    psexec -accepteula -i -s REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep\Cleanup /v "{EC9FE15D-99DD-4FB9-90D5-5B56E42A0F80}" /t REG_SZ /d "C:\Windows\System32\iesysprep.dll,Sysprep_Cleanup_IE" /f >NUL  2>NUL
    psexec -accepteula -i -s REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep\Generalize /v "{EC9FE15D-99DD-4FB9-90D5-CE53C91AB9A1}" /t REG_SZ /d "C:\Windows\System32\iesysprep.dll,Sysprep_Generalize_IE" /f >NUL  2>NUL
    psexec -accepteula -i -s REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep\Specialize /v "{EC9FE15D-99DD-4FB9-90D5-676C338DC1DA}" /t REG_SZ /d "C:\Windows\System32\iesysprep.dll,Sysprep_Specialize_IE" /f >NUL  2>NUL
    psexec -accepteula -i -s REG ADD HKLM\SOFTWARE\Microsoft\Windows\StreamProvider /v "LastFullPayloadTime" /t REG_DWORD /d "0" /f >NUL  2>NUL


    • Edited by Kurt B. Mayer Tuesday, June 14, 2016 8:54 PM Code update.
    Tuesday, June 14, 2016 8:52 PM
  • This was the solution I was looking for!  Thanks, Riffing!
    Friday, July 15, 2016 6:01 PM
  • Thanks for posting this.  I know this post is 6 years old, but I'm hoping someone sees this.  I'm pretty new to answer files and I can't find where to put this in the XML file.  Which configuration pass does it go in?  What exact tags do I need to place this inside?  Would it be possible for you to show this setting in the context of the answer file?  Thanks!
    Monday, July 18, 2016 6:44 PM
  • Thank you it  work for i have on sysprep for 2 Days reinsatll 5  times lost office product ke  3 times  tihs is they only way 
    Monday, October 31, 2016 12:18 PM
  • Worked great! thanks for the help.
    Monday, December 19, 2016 5:01 PM
  • Many years on, and this issue resurfaces! SysPrep is failing on me, and since this is by far the most active thread on the topic, I thought I'd return to it.

    I have tried all the solutions posted here but my same error persists:

    2016-12-22 10:35:00, Error      [0x0f0082] SYSPRP LaunchDll:Failure occurred while executing 'drmv2clt.dll,Sysprep', returned error code -2147467259[gle=0x00000002]
    2016-12-22 10:35:00, Error      [0x0f0070] SYSPRP RunExternalDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = -2147467259[gle=0x00000002]
    2016-12-22 10:35:00, Error      [0x0f00a8] SYSPRP WinMain:Hit failure while processing sysprep cleanup providers; hr = 0x80004005[gle=0x00000002]
    

    When I saw the drmv2clt.dll, I thought disabling the Windows Media Player would do the trick, but to no avail. I even get the same error when trying in Safe Mode.

    I am building a Win7x64 machine with IE8 for a PCN environment.

    The world may be out of answers for this, but if anyone after me has the same errors, just know you're not alone.

    Thursday, December 22, 2016 4:45 PM
  • you are the man!!!


    jaja

    Tuesday, January 17, 2017 3:34 PM

  • Very easy, just paste the above code into a BAT or CMD file => Run it and wait to complete.

    Thanks for BAT file, it worked.

    Friday, March 31, 2017 5:42 AM
  • This resolved my issue of sysprep not working with the -generalize setting. I had taken an image from an OptiPlex 3020 and updated it for an OptiPlex 3050. After running sysprep - generalize, after reboot it wouldn't setup.

    To uninstall MSDTC :- msdtc -uninstall

    To reinstall  MSDTC :- msdtc –install

    It was good to go.

    Friday, April 28, 2017 4:16 PM