none
Failed to run syspref "Test for CloneTag in registry to verify Sysprep completed"

    Question

  • Hi All

    After install windows 7 and some application i try to capture and sysypref from running script
    cscript \\server\DeploymentShare\Scripts\LiteTouch.wsf

    i get below error

    <![LOG[FAILURE (Err): -2147024894  0x80070002: Test for CloneTag in registry to verify Sysprep completed. - Unable to open registry key "HKEY_LOCAL_MACHINE\System\Setup\CloneTag" for reading.]LOG]!><time="12:47:30.000+000" date="01-31-2010" component="LTISysprep" context="" type="2" thread="" file="LTISysprep">
    <![LOG[FAILURE ( 6191 ): Test for CloneTag in registry to verify Sysprep completed. - Unable to open registry key "HKEY_LOCAL_MACHINE\System\Setup\CloneTag" for reading.]LOG]!><time="12:47:30.000+000" date="01-31-2010" component="LTISysprep" context="" type="3" thread="" file="LTISysprep">
    <![LOG[Litetouch deployment failed, Return Code = -2147467259  0x80004005]LOG]!><time="12:47:31.000+000" date="01-31-2010" component="LiteTouch" context="" type="3" thread="" file="LiteTouch">
    <![LOG[For more information, consult the task sequencer log ...\SMSTS.LOG.]LOG]!><time="12:47:31.000+000" date="01-31-2010" component="LiteTouch" context="" type="1" thread="" file="LiteTouch">
    <![LOG[Property RetVal is now = -2147467259]LOG]!><time="12:47:31.000+000" date="01-31-2010" component="LiteTouch" context="" type="1" thread="" file="LiteTouch">

    Thanks ,
    Davide
    Sunday, January 31, 2010 11:01 AM

Answers

  • You don't necessarily need (or want) to remove them from the work bench, try disabling the mass storage driver injection step, or disabling the reboot to winpe/sysprep steps, and manually modify your sysprep.inf then run sysprep manually to see if it hoses up. Typically the result of a "failing sysprep" is, it will run - disappear - and not reboot your pc.  Generally this happens because a storage driver is corrupt, or missing from the drive yet have a pointer in sysprep.inf

    -D

    -Dustin
    Wednesday, February 03, 2010 2:29 PM

All replies

  • Sysprep is failing, but because it doesn't do any logging or provide any useful information, figuring out why is a challenge.  More often than not, this is usually a mass storage driver issue.  So you might want to try removing mass storage drivers from Deployment Workbench to see if the problem goes away.

    -Michael Niehaus
     Senior Software Development Engineer
     mniehaus@microsoft.com
    • Proposed as answer by Kjeld Nielsen Tuesday, September 11, 2012 8:47 AM
    Wednesday, February 03, 2010 7:19 AM
  • Hi,

    I am having the same issue with using MDT2010 and capturing a win7 image'd PC I also get
    'Unable to open registry key "HKEY_LOCAL_MACHINE\System\Setup\CloneTag" for reading.]LOG]!><time="12:47:30.000+000" date="01-31-2010" component="LTISysprep" context="" type="3" thread="" file="LTISysprep">'

    Above you refer to 'try removing mass storage drivers from Deployment Workbench' Sorry for a simple question but how do I remove the maass stoage drivers from the workbech?

    Thanks
    Wednesday, February 03, 2010 11:42 AM
  • You don't necessarily need (or want) to remove them from the work bench, try disabling the mass storage driver injection step, or disabling the reboot to winpe/sysprep steps, and manually modify your sysprep.inf then run sysprep manually to see if it hoses up. Typically the result of a "failing sysprep" is, it will run - disappear - and not reboot your pc.  Generally this happens because a storage driver is corrupt, or missing from the drive yet have a pointer in sysprep.inf

    -D

    -Dustin
    Wednesday, February 03, 2010 2:29 PM
  • Hi All,

    I had disabled this in taks sequence -->Capture Image-->Add Mass storage drivers to sysprep.inf for XP and 2003, i had checked to disable that step.

    This is the task sequence which i have used to Install OS + Applications and continued to capture Image. I Still get CloneTag error.

    Please advice.

    Thanks


    Tuesday, February 16, 2010 5:01 AM
  • Actually, I ran into this same thing while running a sysprep and capture TS on a 64 bit machine.  I monitored the registry during this and noticed that as soon as Sysprep begins processing, it removes the clonetag registry value.  When it tries to populate this value at the end of processing, it can't find it and errors out.

    Before I run the TS, I make sure the clonetag value is there.  I made a .reg file to add this value back in right after sysprep starts.  No problems with this now.
    Friday, February 19, 2010 4:09 PM
  • I tried adding the CloneTag key in the registry, and this did not seem to allow me to make my capture of Windows 7.  I also saw a thread about "tricking" the Task Sequence by adding the key back since the sequence deletes it before it checks for it, or whatever.  However, my key is still there.  It does not ever get removed.
    Friday, February 19, 2010 4:18 PM
  • Sorry i was late..i was not watching my hotmail inbox for alerts..

    am away from Lab ..i ll get back once i try this


    Thanks a lot anyways
    Friday, February 26, 2010 5:59 AM
  • In case you are receiving the same "CloneTag" error trying to Sysprep and Capture, try this:

    On your Windows 7 reference PC, open the registry editor.  Navigate to HKLM\system\setup.  Look for a multi-string value called "CloneTag".  I'm guessing it's not there.

    Add a new multi-string value, name it "CloneTag".  The actual value is not important.  I'm not sure if case on the name is important, so I mimicked what the error suggested.

    Export the HKLM\system\setup key and save to a .reg file.

    Edit the .reg file, and remove all other entries except for the CloneTag value.

    Run the cscript to launch the Task Sequence selector.  Select your Sysprep and Capture Task Sequence.  Enter your credentials, and go.

    When it gets to the part where it is executing sysprep, run your .reg file to quickly import the CloneTag multi-string value.  If you see it proceed to PE, then you should be in the clear.
    Friday, February 26, 2010 2:19 PM
  • Yes, it's important to wait on importing that clonetag reg file back in until sysprep begins processing.  You can even have regedit open and watch that value disappear as sysprep starts to run.  At that point, import the reg file to create the clonetag value.
    Friday, March 05, 2010 7:18 PM
  • As far as i fixed the problem is that i did remove the entry almost at the start. The problem with sysprep in MDT is that it first removes clonetag, and at the end need it.

     

    I removed the oShell.RegDelete "HKEY_LOCAL for the clonetag from the start of LITSysprep.

     

    It makes sysprep works and nothing changes for ur image u want to capture...

    Clonetag is no more than an reminder. The technic i described, i used to use it a lot and it works fine for me

     

    CompliXD

     

    Thursday, July 01, 2010 7:56 AM
  • The only way it worked for me was to modify the sysprep&capture task sequence under MDT2010 and add manyualy the registry key under sysprep option. After all this works like a charm.

    Wednesday, July 14, 2010 3:29 PM
  • This worked for me and I'm very glad you suggested it as the other way would have been a pain in the but to do everytime you needed to capture an image.

    Thanks

    Monday, March 28, 2011 4:46 PM
  • Wow! That worked!  Thanks so much Chris.   I thought for sure I was going to have to rebuild my image.   You saved me a lot of time.   Also thanks to brumar59 for the tidbit on timing.   
    Thursday, April 14, 2011 8:25 PM
  • It's really not a good idea to bypass this check (by skipping it or by manually creating the key) - if the CloneTag registry key isn't getting created by Sysprep, then Sysprep didn't work - that means your image is in some "undetermined" state that may come back to haunt you later.

    -Michael Niehaus
     Senior Software Development Engineer
     mniehaus@microsoft.com
     http://blogs.technet.com/mniehaus

     

    Thursday, April 14, 2011 9:21 PM
  • Michael - If the workarounds in this thread are not suggested, then how do we "fix" sysprep to work properly?

     

    Wednesday, July 06, 2011 4:15 PM
  • Yes Michael, what's your solution? a rebuild?
    Tuesday, July 12, 2011 8:46 PM
  • You need to figure out why sysprep is failing.  The simplest way is to rebuild the OS (consider the current install to be "trashed" by sysprep) but manually sysprep it with the same answer file and settings, ideally from the failed install.  (Most sysprep failures are caused by bad mass storage drivers being injected into the image.  So if you do it manually without the same mass storage drivers, then your test wasn't really the same.  It will likely work without the drivers.)

    If that fails, then you need to figure out why - that's not simple with XP because sysprep does no logging.  (It's much easier with Windows Vista and above because Sysprep will tell you explicitly what it doesn't like.)

    Deploying a potentially corrupted image isn't a good move, so getting to the root cause should be a priority.  It may take a call to Microsoft Support to work out the cause though.

    -Michael Niehaus
     Senior Software Development Engineer
     mniehaus@microsoft.com
     http://blogs.technet.com/mniehaus

     

    Tuesday, July 12, 2011 8:52 PM
  • Would you be so kind to tell me exactly how to add the entry in task sequence. I see a execute sysprep task, on the right I see command line: and a options tab. I'm kind of new at this. Any help would be greatly appreciated. Kurt
    Friday, March 09, 2012 11:34 PM
  • Hello

    Just thought I would add my fix for this issue for anyone who is still getting it:

    Go into Services.msc and stop and disable the following service: "Windows Media Player Network Sharing Service"

    Then sysprep continues on past the stage where it gives the warning about the CloneTag key and successfully completes (hopefully!).

    In this instance if you instead manually re-add the CloneTag key the image will give a BSOD on restart if you try to deploy it (mine did anyway).

    It appears the error occurs and the sysprep stage fails so the CloneTag is not set to stop the deployment going any further.

    If the task sequence is failing then it may be better to run a local sysprep and generalize from c:\windows\system32\sysprep\sysprep.exe as this gives better error messages.

    It's also good to build the reference computer image in a virtual machine which you can snapshot before you start so can quickly revert back and try again if it messes up (as mine did a few times until I worked out the cause).

    Your issue may not be the same as mine though but hope it helps someone.

    Robin

    P.S. Looking online it looks like the bug with the windows media sharing service goes back as far as pre RTM builds.


    Robin Wilson



    • Proposed as answer by robinwilson16 Monday, April 02, 2012 7:38 PM
    • Edited by robinwilson16 Monday, April 02, 2012 7:47 PM Added some other info
    Monday, April 02, 2012 7:38 PM
  • Hi, this solution worked for me in 2010 and I had to employ it again in 2012.

    http://social.technet.microsoft.com/Forums/en-US/mdt/thread/553bec59-d795-4b89-8328-19a38161eff3/#01c3c66f-9a88-4b64-a616-7bf767febcb0

    Go to the Scripts folder in your DS box
    1. Create a backup of the LTISysprep file somewhere on your desktop so you'll have a copy if something goes awry
    2. Open the LTISysprep file with Notepad
    3. Remove the oShell.RegDelete  "HKEY_LOCAL_MACHINE\System\Setup\CloneTag" line
    4. Close and save the file
    5. Update your Deployment Share
    6. Proceed to capture the image by logging into the reference computer and running the LiteTouch script on your DS machine

    • Proposed as answer by AcetiK Monday, March 18, 2013 2:59 PM
    Friday, April 20, 2012 6:41 PM
  • Hi,

    this fix is working for me!

    Thanks

    Thursday, April 26, 2012 9:04 AM
  • I have tried all of these suggestions but I am still having the problem. Now, given that  as Michael says, this is not a good idea, and second, the same solution doesn't work for everyone, I am trying to find the root of the problem. I am working on creating an XP Image and everything works as expected when I revert to the first Snapshot in which Windows is clean and without updates (clean install using the CD source files). The moment I start updating (all updates except IE 8) and install the applications (Adobe, Java, Office 2003 etc etc) then I get into the CloneTag problem.

    Is an update or application breaking sysprep? That's my theory. I will keep you posted on this.


    A.P>

    Friday, May 25, 2012 6:47 PM
  • Hello

    Just thought I would add my fix for this issue for anyone who is still getting it:

    Go into Services.msc and stop and disable the following service: "Windows Media Player Network Sharing Service"

    Then sysprep continues on past the stage where it gives the warning about the CloneTag key and successfully completes (hopefully!).

    In this instance if you instead manually re-add the CloneTag key the image will give a BSOD on restart if you try to deploy it (mine did anyway).

    It appears the error occurs and the sysprep stage fails so the CloneTag is not set to stop the deployment going any further.

    If the task sequence is failing then it may be better to run a local sysprep and generalize from c:\windows\system32\sysprep\sysprep.exe as this gives better error messages.

    It's also good to build the reference computer image in a virtual machine which you can snapshot before you start so can quickly revert back and try again if it messes up (as mine did a few times until I worked out the cause).

    Your issue may not be the same as mine though but hope it helps someone.

    Robin

    P.S. Looking online it looks like the bug with the windows media sharing service goes back as far as pre RTM builds.


    Robin Wilson




    Thanks, this worked for me trying to sysprep Windows 7 x64 Home Premium.

    • Proposed as answer by jrocketb Monday, May 12, 2014 11:56 PM
    Saturday, September 01, 2012 11:19 AM
  • I got this error when deployng win8. Disabling mass storage drivers fix the problem.
    Mass storage drivers is a task for XP and server 2003, but I forgot to disable it in the first place from the standard Tasksequence.

    Kjeld Nielsen

    Tuesday, September 11, 2012 9:03 AM
  • Hi, this solution worked for me in 2010 and I had to employ it again in 2012.

    http://social.technet.microsoft.com/Forums/en-US/mdt/thread/553bec59-d795-4b89-8328-19a38161eff3/#01c3c66f-9a88-4b64-a616-7bf767febcb0

    Go to the Scripts folder in your DS box
    1. Create a backup of the LTISysprep file somewhere on your desktop so you'll have a copy if something goes awry
    2. Open the LTISysprep file with Notepad
    3. Remove the oShell.RegDelete  "HKEY_LOCAL_MACHINE\System\Setup\CloneTag" line
    4. Close and save the file
    5. Update your Deployment Share
    6. Proceed to capture the image by logging into the reference computer and running the LiteTouch script on your DS machine

    This works for me, thanks !
    Monday, March 18, 2013 2:59 PM
  • None of the items helped me. This is what fixed my issue:


    Use regedit to change the below reg keys to match

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

    CleanupState:2

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

    GeneralizationState:7

    Thursday, June 20, 2013 8:31 PM
  • Thanks a lot after trying everything the above worked for me.
    Wednesday, July 03, 2013 12:22 AM
  • not so much, I did this and didn't realize that all this did was suppress the error message. Couple months later I realized I wasn't getting final summaries on my deployments
    Monday, August 26, 2013 12:05 AM
  • this is a BIG affirmative.
    Monday, August 26, 2013 12:05 AM
  • for my circumstances sysprep when executed on its own works fine, when trying to run sysprep through an MDT TS is where I've run into problems. I've been at this for 72 hours straight and I have no idea what to do next.
    Monday, August 26, 2013 12:07 AM
  • omfg don't do this. YOU A$$HOLE you cost me days of troubleshooting. This only supresses error messages.
    Monday, August 26, 2013 12:17 AM
  • This wasn't solved, that's a workaround.

    I encountered this problem, the problem is your capture task sequence is looking for a different version of windows. Re-create your capture task sequence and ensure you have the same version e.g. pro, enterprise, home chose in the task sequence.

    Wednesday, March 05, 2014 11:14 PM