Welcome to Delicate template
Header
Just another WordPress site
Header

Sysprep your Windows OS for more than 3 times

November 8th, 2010 | Posted by sharon in Miscellaneous
 

It can happen, the need of re-syspreping an already syspreped machine, why ? maybe you lost your Image master. so.. you running the setup process, adding the changes you want, relocating the XML answerfile, running the sysprep with /generalize switch.. the process is running for few seconds and then the sysprep window is disappeared. well.. open the sysprep log file under \sysprep\Panther … there you will find setup error log, if the logfile contains this line :

Date Time, 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

then Microsoft say… “Hey dude, bummer…, re-create the whole image“.

well… it’s not so true… this error indicates that you syspreped the machine more then 3 times, you cant do that… if the windows system was already activated by pre OEM activation you cant even re-arm the machine.. so you have 2 problems, one – can’t sysprep anymore and probably you can’t re-arm your machine (it wont let you sysprep if you cant re-arm..).

so, first check if you can re-arm by runing the slmgr.vbs /dlv and check the re-arm counter, if it set to zero.. you need to do the following : http://support.microsoft.com/kb/929828 (set the <SkipRearm>1</SkipRearm> like in the example, note: this option will make the product key window to appear in the setup process).

you can also try running : slmgr.vbs –rearm, to rearm Windows.

after that, let’s come back to the sysprep process.. for syspreping already syspreped machine we have to change few keys in the registry :

HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus\GeneralizationState\

CleanupState:2
HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus\GeneralizationState\

GeneralizationState:7

After done with the registry, do the following :

  1. Start -> Run : msdtc -uninstall (wait few seconds)
  2. Start -> Run : msdtc -install (wait few seconds)
  3. Restart the machine
  4. Check the registry for the right registry keys values
  5. sysprep with the new XML answerfile.
  6. and.. Walla !
  7. Have fun.

You can follow any responses to this entry through the RSS 2.0 You can leave a response, or trackback.

38 Responses

  • Balint Farkas says:

    Thanks for this great article, you just saved my day!! I have fought with this issue before, but now I finally have a solution on hand. Thanks again!

  • David says:

    Thanks a million! This is a TRUE solution!

  • Nick says:

    After spending DAYS on this problem I luckily stumbled across your blog, it seems no one else has posted this solution but you. Thanks so much!

  • Memes says:

    You are about to save my holidays.
    How to check how many times an image have been syspreped? as I have one image that should have been syspreped once, but I am not sure and I want to check it first (before using your how-to)

    Other question, what happen with an image syspreped more than 3 times? do I get a message at first logon or after 30days? because I do not want the machine to all come back 30days later if I make a mistake, I’d rather not sleep tonight.

    • sharon says:

      Hello,
      by Running the slmgr.vbs script with /dlv parameter, you could find remaining rearm count…. for ex, 3 says you can sysprep it more 3 times.
      In addition, If you sysprep more than 3 times, you won’t be able to sysprep the image, it will fail with errors.

      Good luck !

  • Gregory Watts says:

    Thank you!!!

  • Chuck says:

    FANTASTIC! I first pulled up the KB article from MS that said I had to create a new image. I knew I could find something else to save the day, and this was it.

    BIG Thanks.

  • Just desire to say your article is as surprising. The clearness in your post is just cool and i can assume you’re an expert on this subject. Fine with your permission let me to grab your feed to keep up to date with forthcoming post. Thanks a million and please carry on the rewarding work.

  • Pingback: Hi to harry - Page 9

  • Remco says:

    Thnx! you saved the day! and a lot of extra work…..

  • bjseth says:

    I set the Microsoft-Windows-Security-SPP_neutral SkipRearm to “1″. I imaged my computer. When it was finished, I ran slmgr /dlv and it had rearm count = 0. I checked the registry settings and they were, respectively, “2″ and “7″. I ran the msdtc uninstall and reinstall. I restarted the computer. Regedit still shows “2″ and “7″ for CleanupState and Generalization. Slmgr /dlv still shows rearm count = 0. The setupact log in the Panther folder shows “successfully executed …rearmwindows without error”. I tried slmgr /rearm and it tells me that the maximim allowed number of re-arms has been exceeded and to reinstall the operating system. Did I miss something? Isn’t this exercise supposed to remedy this? Please let me know if I missed something. Thank you.

  • Albeezzyy says:

    You da man. At least someone shares the goods.

  • Branko says:

    Thank you!

  • Pingback: Sysprep Windows 2008 more than the permitted number of times…. | TechBlog

  • Chris says:

    Unfortunately NONE of this stuff has worked for me. and when I re-run sysprep with the 1 in the answerfile the registry entries get reset to 1 and 4 respectivly.

    • Chris says:

      “1″ was supposed to be there but the editor interpreted it as HTML code I guess.

      • Chris says:

        SkipRearm>1</SkipRearm once more just to get my point across.

        • Kola says:

          Try disabling windows media network sharing service. I had the same problem as you worked after i disabled it.
          Error [0x0f0082] SYSPRP LaunchDll:Failure occurred while executing ‘drmv2clt.dll,Sysprep’, returned error code -2147024864[gle=0x00000020]

          This error is caused by the Windows Media Player Network Sharing Service. There is a bug in Sysprep that will prevent it from running to completion if the Windows Media PLayer Network Sharing Service is running. To disable this service:
          1. Click Start, type services.msc in the search box and press enter.
          2. Scroll down to the Windows Media PLayer Network Sharing Service and set it to disabled.
          3. Reboot the machine at try to run sysprep again.

  • Hayden Hancock says:

    Good article. However, I was unable to get this to work.

  • Jon Lewis says:

    Came across this after searching for a solution to my error logs in the sysprep folder in relation to a MDT 2012 capture.

    All I can say is exellent work man.

  • Ripclaw says:

    I love you :)

    FYI, using SkipRearm will cause KMS not to increment the licensing count.

    http://support.microsoft.com/kb/929828

  • Mahmoud says:

    Hello
    When I try to create image for windows 7, i entered SYSprep file and choose

    System CleanUp Action : Enter System Audit Mode
    then i checked the Generalize
    Shutdown Option : Reboot

    then i clicked OK.

    After it finished the windows restart and it could be reboot. it says Windows prepared for the first time with error installation can not complete please restart and try again
    after 2-3 times i have the same but without error but keeping restart without reboot

    Please i need help in that

  • Michal says:

    You are my private Jesus Christ !!

  • Kevin G says:

    This doesn’t work unfortunately

  • jayc says:

    Doesn’t work anymore with Seven Pro….

  • Caco says:

    The very first time something read on a forum works perfectly!!!
    For me on WES7!!!

  • “Sysprep your Windows OS for more than 3 times | IT in a
    box” was indeed definitely engaging and helpful! In the present day world honestly,
    that is very hard to carry out. I am grateful, Dave

  • thanatos says:

    Now i try this procedure… If it work you are my new god…

    Clean up phase… Passed
    Generalize phase…. Passed

    Hail to new god

  • MK says:

    This didn’t work for me. I followed the entire process but still can’t sysprep my image (This is happening in an enterprise image that took aproximately 4 months to complete, so you can picture the criticallity of the situation). I still get the errors that appear in that microsoft Post in the logs!

    • isaiah says:

      i was in the same boat as you. i’m adding some software to images that my business school has been using, and building upon, for almost 2+ years now. “You must rebuild your image from scratch” is the absolute last thing you want to hear.

      Here’s what worked for me:
      All the steps as outlined by Sharon must be followed through.
      I also went and disabled Internet explorer, and a couple other misc featured windows programs via cpanel->add/remove programs
      I deleted the panther folder that is found in c/windows/system32/sysprep (note: you may want to back this up instead of deleting it completely, but I dont think it matters too much. Everything is re-created upon attempting your next sysprep)
      Unplug your network connection before you try to sysprep!

      Let me know how it goes

  • Oskar says:

    Thanks my friend… You saved me many hours… It worked like a charm…

  • Ed says:

    NOTE: I am using a Virtual Machine for my master.

    I am taking over the creation of images and out of ignorance blew through my 3 allotted syspreps on a machine created from scratch. I verified my rearm count was 0 via the slmgr.vbs /dlv command. Then I edited the registry as instructed, ran the msdtc -uninstall and msdtc -install commands then rebooted.

    Checked the registry and the SysperpStatus settings were still there. Finally I tried the slmgr.vbs /dlv command to see if my allowed rearms were reset or not. It is still at 0.

    Rather than possibly undoing everything I have already done by attempting a Sysprep (with the added xml in the unattend.xml file) I thought I would ask. Did I miss any steps, should the rearm count be at something other than 0?

    Thanks, I have complete faith that I (we) will get it working

  • Udi says:

    same issue as Ed mentioned.
    just wanted to check if i got the idea right:
    if my rearm counts are over (0) does any of the above help me reset the rearm count back to 3?
    or does it only let me pass the sysprep task?



Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>