Correct way to capture/deploy Windows 7 image with Sysprep configured to copy default profile


  • I am new to SCCM and converting to it from Altiris.  I understand the redcommended way of imaging with SCCM is to do a 'vanilla' OS deployment with very little on it and than using task sequences deploy all my required software.  However being that I am in a school district, we have always done things a bit differently than the corporate world, specifically when we build our images we put pretty much everything on the image, meaning all required software like Office, Adobe, etc.  Basically what we do is get everything installed and updated, configured how we want it, run all the programs once, and then using Windows 7 verison of sysprep, i run sysprep with the appropriate switches using an unattended answer file i have, then when the machine shuts down, i capture the image with Altiris and then can deploy that image at will and it works great.  Basically what the answer file does for me among some minor things, is it copies the user account I configured with over the built in default profile (MS recommended way) so when users login and builds their profile off the default profile which is set to go - no EULA pop-ups, no first time run dialogs, nothing to accept, etc.

    My question is can something similar to this be done with SCCM?  Where I have my image built the way I want, have it sysprep with my answer file to create the default profile, and then be able to deploy that image?  If so can someone please provide some details how it can be done.  If it can't, any recommended alternatives, though I'd really rather not reinvent the wheel here after so many years.  Thank you very much!

    Brian Stein
    Wednesday, June 01, 2011 12:42 PM

All replies

  • Hi,

    Yes of course you can do it this way if you like, you can install Windows 7 manually if you like and then use the Capture media to capture the image,
    You can also install the OS with sccm if you like and then skip the capture part, install all your application and then use the capture media, you can do it many ways.

    How to capture an image using capture media:


    -- My System center blog --
    Wednesday, June 01, 2011 1:00 PM
  • One word of caution... I used the capture CD once. It seems to hose something up so that when you are laying down the image it doesn't know if it's x86 or x64 so my xml that copies the default profile didn't work. I resolved the issue by using MDT to build my reference images.

    (in Windows 7 the default user profile is copied at deployment time not capture time as it was in XP)

    John Marcum ||
    Wednesday, June 01, 2011 1:08 PM
  • OK so question - so are you both saying that i basically do it the same way I've been doing it?  Meaning, when I think my master image is ready, i can still run sysprep on the machine liek I've been specifying my sysprep switches and xml file, then when it shutsa down I can then use the capture media (CD, or PXE whatever) to capture the wim image?  Then I can deploy that to other machines just like I've been?

    So assuming what I'm asking above is correct, what do I do about the task sequence steps that want to know about the local administrator settings, etc, since I take care of all of that in my answer file?  Will those settings be ignored?  Do I have to enter that stuff in?  Thanks!

    Brian Stein
    Wednesday, June 01, 2011 2:02 PM
  • I'd build my reference image out of MDT lite touch and let that capture it.


    John Marcum ||
    Wednesday, June 01, 2011 2:10 PM
  • And then do you deploy via SCCM?
    Brian Stein
    Wednesday, June 01, 2011 3:25 PM
  • Yes, I think this is the method most are using.
    John Marcum ||
    Wednesday, June 01, 2011 7:32 PM
  • So is there any way to create a custom TS to capture an image that uses PXE?  I'm confused when and how PXE comes into play with SCCM as we try and get it working.  With Altiris any and all imaging (capture or deploy) revolves around PXE which uses WinPE.  Is there a way to leverage PXE with a custom TS so that when Sysprep shuts down my machine I can then capture it from there? 

    Also, with regards to sysprep, is it true that if I use the capture media (cd) that I have to have the sysprep directory located on the root of the C drive and that the capture media does the sysprep for me?  This is what I've been told but want to double check.  Thanks!

    Brian Stein
    Thursday, June 02, 2011 8:16 PM
  • If you want to sysprep by hand, and then capture that image using PXE and a TS, you must add two steps to the TS

    1: Set Task Sequence Variable : OSDTargetSystemRoot = C:\

    This will tell SCCM which Disk to capture, and is set automatically if you let SCCM run the sysprep part (TS or DC)

    2:  Capture Operating System Image

    Here you must specify where to capture the image, and the account to do so. If you capture using the capture CD, the wizard will prompt you for this info.

    Alternatively you can use MDT script and ImageX

    Don't get fooled by the title, it captures the OS partition regardless of the state..


    About the Sysprep directory on C, then that is only true for pre VISTA systems. All others already have sysprep present. If you run the sysprep part using the capture CD it will present you with a wizard to populate info to the steps you would otherwise have in your capture TS, so there is no difference. Sysprep.exe must always be present (which it is by default in win7) but in an XP scenario you would have a step in your TS that copies the sysprep files to c:\sysprep. you would obviously not have that if you use the CD to capture a running system...

    Michael Petersen
    Friday, June 03, 2011 6:40 AM
  • First thing I just want to thank everyone for the great information, I really appreciate it!  Secondly, so I'm going to start testing today but I guess the one thing I'm still missing, or not grasping properly, if I try the Capture Media, my understanding is that I run this on my 'master image' machine while the machine is on and i'm logged in locally.  Assuming that is true, then how is my custom unattend.xml file utilized?  Among some other things, the main thing my xml file does is set the copy profile parameter to create my default user profile.  So how, where, or when is that leveraged by using the capture media if it automatically runs sysprep for me without me running sysprep from the command line and specifying my unattend file?

    Is the capture media smart enough to where if I run it on a Win 7 machine it knows to look in C:\WIndows\System32\sysprep and if I place my answer file there it will use it?  What am I missing?  I am also aware of what John says above that the capture media seemed to have not applied his xml settings, but I still want to try/test all scenarios.  Thanks!

    Brian Stein
    Friday, June 03, 2011 12:14 PM
  • Sorry I have a follow up question here.  So it turns out John was right and when using the capture media it did not utilize my xml file properly and didn't create my default profile.  So before turning to MDT, I want to try to manually run sysprep and use a custom TS to capture my image via PXE.  My question is, how do I advetise this custom TS to my source computer if this computer is not on the domain and thus not in SCCM?  Is there a way to pre-populate SCCM with the computers mac address for example and advertise to that so that when it PXE boots it knows what to do?  Does that make sense?  Thank you!
    Brian Stein
    Tuesday, June 07, 2011 6:09 PM
  • I don't think doing it manually is going to work either. I wish I could recall exactly what the technical explanation is of why it doesn't work unless you use MDT. I'm sure Niehaus could explain it in a second. I do know that it has something to do with the image being incorrectly identified as x86 or x64 which causes it to try and use the wrong XML file. I had a LONG case with CSS before they finally figured it out. I just decided to use MDT, it's easier that way.



    John Marcum ||
    Tuesday, June 07, 2011 6:34 PM
  • Cool thanks John! For my own technical curiosity I'm still going to give it a shot manually but once it fails I will look into MDT.  So does MDT integrate into SCCM or is it independent of it and just creates my wim for me that i reference when i deploy via SCCM?  Also, when deploying via SCCM, one of the TS's talks about things like enabling or disabling the local administrator account.  I enable this with an encrypted password in my XML file so how does that get resolved?
    Brian Stein
    Tuesday, June 07, 2011 6:42 PM
  • It integrates in however I build my image directly out of MDT and not SCCM.

    An infamous quote, "MDT fixes problems that you didn't even know you had" always comes to my mind when people are not using it. ;-)



    John Marcum ||
    Tuesday, June 07, 2011 6:56 PM
  • So I just wanted to give a status update here in case anyone was interested.  So my first test went as expected.  I utilized the capture media and my answer file was thus not used apparently and the default profile was not set properly.  I was then about to move to test 2 which was trying it with the custom TS to capture the image but first I decided to create a package for my answer file and i used this in the TS of my deploy image job to deploy the image i just captured.  Much to my surprise it seemed to have worked, at least for the most part.  The default profile was created/updated and everything looks ok.  The only part of my answer file that was overwritten was the behavior of the local admin account.  I enable this and set a password in the answer file but the TS step that refers to the local admin I believe comes after the answer file piece and there it was set to have it disabled.  Not the end of the world as I can always set this in the TS step.  So is there something I might have missed that is giving me false results here?
    Brian Stein
    Thursday, June 09, 2011 2:36 PM
  • Question for John Marcum, or anyone else who might have an answer of course.  So I finally integrated MDT and captured an image with it.  What I did was run sysprep manually like i always do pointing it to my answer file and telling it to shut down.  Then I captured the image using an MDT TS via PXE.  Worked fine.  However when I deployed my image it did not appear to copy/create the default profile.  Do you run sysprep manually or do you do it another way?  Also, what steps do you use when capturing the image via MDT?  Mine has 4 steps - Use toolkit package, set capture directory, set filename, and create image which runs the ZTIbackup command.  Is there a better way or what does it sound like I missed that is causing the default profile to be ignored?  Thanks!
    Brian Stein
    Wednesday, June 22, 2011 7:19 PM
  • I'm also interested in the questions posted by stein_brian above regarding the copyprofile and default user profile.  It seems to me when you run a Build and Capture TS in SCCM, when sysprep executes the custom Admin profile is deleted but not moved because the custom answer file with the copyprofile setting is not utilized.  This link here states the copyprofile answer file should be utilized when deploying the captured image,  When I run through this process, the image is deployed and my custom profile is not loaded.  The TS logs show there is not profile to copy when deploying the image that was captured using the SCCM Build and Capture TS.  I don't understand why there is no option in the Prepare Windows for Capture task to add a custom answer file.  Of course I could be missing something here.  Thanks.
    Wednesday, June 22, 2011 8:33 PM
  • The default user profile threw me for a loop too when I deployed Win 7 for the first time. Win 7 is the opposite of XP. It copies the admin profile to default user at deployment time rather than at capture time. Also I found that capturing an image outside of MDT the copyprofile option isn't always used. Turns out this is because the OS is being detected as the wrong architecture. It's been over a year since I messed with that so I don't remember all the details.


    John Marcum ||
    Thursday, June 23, 2011 1:32 PM
  • OK thanks anyway.  So I can get it to work when using capture media ironically, but I just don't want to be reliant and cd's anymore.  Those days are over! I'm going to try it again but this time on the deploy job I'm going to specify my answe file (I already have a package created).  I feel this shouldn't be necessary since I'm running sysprep manually before capturing the image and pointing to my answer file but I figure it's a worth a shot.  'TheBearPoo' I will reply back on how it goes in a day or so when I test it.
    Brian Stein
    Thursday, June 23, 2011 7:49 PM
  • We are using MDT to build our reference image and designate a lot of custom settings in the default profile.
    I am currently developing the capture for the reference image.

    If we manually run sysprep we can reference the unattend.xml to keep all the settings in the default profile. If I use the task sequence capture media to image the machine the unattend.xml cannot be designated and the default profile is not copied.

    Can we deploy an image in SCCM that was syspreped in MDT without using the task sequence capture media?

    Thursday, March 15, 2012 8:34 PM
  • open that question in a new thread.. That way you can mark as answer, and more people can benefit from it!

    Michael Petersen | My blogs: and | Twitter: @OSDeploy | Linkedin: Michael Petersen

    Friday, March 16, 2012 7:53 AM