none
When is sysprep.inf and unattend.txt used exactly?

    Question

  • I have a good idea of when each is used, but need other input to verify as this relates to another question I posted and may have found a solution.

    Sysprep.inf - answer file for mini-setup on a PC that is being loaded with a sysprepped and captured image

    Unattend.txt - answer file for Windows setup on a PC that is being loaded with XP from CD (or source files in case of MDT).

    Someone please verify because when I look at the properties of a custom, captured image in MDT, it shows buttons for both sysprep.inf and unattend.txt to edit them and that makes me wonder when each is actually used.  Thanks.
    Monday, January 18, 2010 3:47 PM

Answers

  • Unattend.txt is used during a full text-mode setup of Windows, the way MDT populates vars however it applies settings to both during build be it a full unattended setup, or a syspreped image deployment.

    Sysprep.inf is used in two places: once when sysprep is run on the machine to capture it, and once during deployment. Aside from the hard-disk controllers section, you can make changes to sysprep.inf AFTER you have captured the reference image.  The HDC's must be present prior to running sysprep.exe on the system, but other settings such as say the computer name, domain join info, OEMPnPDriversPath, etc can be populated from WinPE, after the image is applied, before rebooting into mini-setup. This is how the MDT is able to customize your end-result using the database, it modifies these settings prior to restarting into Mini-setup.

    -Dustin
    • Marked as answer by brumar59 Wednesday, January 20, 2010 8:14 PM
    Monday, January 18, 2010 9:10 PM

All replies

  • Hi Brumar59,

    I confirm that : 
       - UNattend.txt is used during a clean installation of your system (XP or 2003), i.e during an install using Sources from the CD (or a copy of the CD)
       - Sysprep.inf is used when you're applying a custom image of Windows XP or Windows Server 2003. The oS was previously installed. 

    So Why does MDT create an Unatted.txt AND a sysprep.inf File ?
    Simply beacouse, by default, MDT create the two Files. 

    You just have to know that if your task Sequence deploys a custom image, the file to be used will be the sysprep.inf File, and if your task Sequence deploys a clean install of your OS, MDT will use the unattend.txt file. 

    Note that there is less parameters in the sysprep.inf file than in the unattend. For Example, in the unattend file you can enable/disable Windows Components (ex : games, dialer, IIS) whereas in the sysprep.inf file you cannot

    Régis

     
    • Proposed as answer by Régis Lainé Monday, January 18, 2010 7:15 PM
    Monday, January 18, 2010 4:10 PM
  • That's what I was thinking...  This posting is related to another I created about the MAC address being all zeros.  After sysprepping and capturing a custom image, I applied it to a computer.  All worked as planned, except that I noticed the NIC is not receiving packets, only sending.  It got a DHCP IP address, but couldn't receive.  Further checking revealed that it's MAC address was 00:00:00:00:00:00!

    I made some minor changes to sysprep.inf and unattend.txt within MDT for that custom image and reloaded it to the computer.  Now, networking is fine and dandy, but I'm not sure what sysprep.inf change would have done the trick as there is not much to even change.  I'll double-check though.

    ; Sysprep.inf file.
    ; This file is to automate the mini-setup process after imaging a machine

    [Unattended]
        OemSkipEula = Yes
        OemPnPDriversPath = "\Drivers"
        DriverSigningPolicy = Ignore
        ExtendOemPartition = 1
        KeepPageFile = 0
        UpdateInstalledDrivers = Yes

    [GuiRunOnce]
        "cscript.exe C:\MININT\Scripts\LiteTouch.wsf /start"
        "cscript.exe D:\MININT\Scripts\LiteTouch.wsf /start"
        "cscript.exe E:\MININT\Scripts\LiteTouch.wsf /start"
        "cscript.exe F:\MININT\Scripts\LiteTouch.wsf /start"


    [Networking]
        InstallDefaultComponents=Yes


    [Display]
        BitsPerPel=32
        Xresolution=1024
        YResolution=768
        Vrefresh=75


    [TapiLocation]
        AreaCode=570
        CountryCode=1
        Dialing=Tone
        LongDistanceACcess=9


    [RegionalSettings]
        LanguageGroup=1


    [GuiUnattended]
        AdminPassword="Password"
        OEMSkipWelcome=1
        OEMSkipRegional=1
        TimeZone=035
        AutoLogon="Yes"
        AutoLogonCount=1


    [Identification]
       CreateComputerAccountInDomain=Yes
       JoinDomain=Domain
    ;   MachineObjectOU= "OU=Workstations, dc=contoso, dc=com"
       DomainAdmin=Administrator
       DomainAdminPassword=AdminPassword


    [UserData]
       ComputerName=*
       FullName="Windows User"
       OrgName="Larson Design Group, Inc."
       ProductKey="xxxxx-xxxxx-xxxxx-xxxxx-xxxxx"


    [URL]
       Home_Page="www.google.com"

    [LicenseFilePrintData]
    ;    AutoMode=PerSeat
    ;    AutoUsers=50

    [Sysprep]
       BuildMassStorageSection = Yes


    [SysprepMassStorage]
    Monday, January 18, 2010 4:17 PM
  • The sysprep.inf that is in your custom image will never be replaced with the sysprep.inf on the deployment share.  The only time sysprep.inf is used is during the sysprep process.  
    Tim Mintner Principal Consultant Xtreme Consulting Group http://deployment.xtremeconsulting.com
    Monday, January 18, 2010 5:12 PM
  • Isn't sysprep.inf also used after a custom image is loaded to a computer, during the mini-setup?
    Monday, January 18, 2010 6:08 PM
  • Unattend.txt is used during a full text-mode setup of Windows, the way MDT populates vars however it applies settings to both during build be it a full unattended setup, or a syspreped image deployment.

    Sysprep.inf is used in two places: once when sysprep is run on the machine to capture it, and once during deployment. Aside from the hard-disk controllers section, you can make changes to sysprep.inf AFTER you have captured the reference image.  The HDC's must be present prior to running sysprep.exe on the system, but other settings such as say the computer name, domain join info, OEMPnPDriversPath, etc can be populated from WinPE, after the image is applied, before rebooting into mini-setup. This is how the MDT is able to customize your end-result using the database, it modifies these settings prior to restarting into Mini-setup.

    -Dustin
    • Marked as answer by brumar59 Wednesday, January 20, 2010 8:14 PM
    Monday, January 18, 2010 9:10 PM
  • The sysprep.inf in the image is used during mini-setup and updated dynamically as Dustin stated but the one on the Deployment Share is not used at all during mini setup.  It is only used when sysprep'ing the image.
    Tim Mintner Principal Consultant Xtreme Consulting Group http://deployment.xtremeconsulting.com
    Monday, January 18, 2010 9:47 PM
  • I'm glad I found this thread as it is helping to explain some things, but I still need help. 

    I am completely new to sysprep - we do not use it at all, despite imaging and sending out probably 10 computers per week to our field sites and installing locally.

    I have found Setupmgr and created unattend.txt files and sysprep.inf files both, but obviously have neither in production as I still don't really understand how to use them.  I have ran my sysprep and seen how it works, but I didn't find anywhere with setupmgr where you can point the OS to the drivers folder, etc.   The way I understood it was unattend.txt and sysprep.inf work together.  It seems from reading these posts that this is not the case?

    I'm just completely lost and this seems like a good place to ask questions.

    Edit - I should note that the goal is to get down to one image for all standard computers, maybe with a slight modification of the sysprep file depending on which model we use.  We were looking at going to Lenovo's ImageUltra Builder, but it is very difficult to set up and we are not sure we are changing vendors to Lenovo at this time.
    Monday, January 25, 2010 4:16 PM
  • The confusion is understandable, as it seems a bit daunting at first. Think of it like this:

    Unattend.txt is used to get windows on the machine up front (say you wanted to automate installing from a CD)

    Sysprep.exe and Sysprep.inf are used to capture any changes you make *after* that point.  

    You can use a sysprepped image without ever using unattend.txt or performing an unattended install. Simply install windows how you want it, create packages of drivers for each of your models, and then add the hard-disk controller entries for your models to the sysprep file, and then to "direct" windows to your driver folders, you would populate OemPNPDriversPath with a semi-colon seperated list of every folder location for every driver in your drivers packages.   Eg:

    OemPnPDriversPath=c:\drivers\Dell E6500\video;c:\drivers\Dell e6500\audio;c:\drivers\Dell E6400\video;c:\drivers\Dell e6400\audio;c:\windows\inf; 

    Change any other settings you want, like your wallpaper or start-bar set to auto hide, modify your sysprep answer file to set the admin password or auto-join a domain for example, then run sysprep.exe on the system.   Now you have a computer in a state which you could use ghost or imagex, or another capture utility to 'capture' the state of the disk and create an image.  When you apply that image, the system will look at that drivers-path as it goes through sysprep mini-setup to find drivers related to the system you've placed it on. You could do multiple models and simply specify all the appropriate driver directories, or deploy with the MDT and make it dynamic.

    Hope this helps.

    -D

    -Dustin
    Monday, January 25, 2010 4:36 PM
  • Dustin, you are very helpful so expect a lot more posts from me ;)

    I added this line under [Unattended] in sysprep.inf and it doesn't seem to be working at all.  I was missing about 8 drivers before running sysprep and am still missing them all.

    OemPnPDriversPath=c:\swsetup\mediacard;c:\swsetup\audio;c:\swsetup\modem;c:\swsetup\graphics;c:\swsetup\wireless


    I know that at least the wireless folder has an inf file in it.  Im assuming they all have to have inf files, but was hoping it would look in subfolders as well.  But anywho, it's not working at all so that's the least of my worries right now.  Any suggestions?

    Monday, January 25, 2010 5:18 PM
  • I just noticed that in fact sysprep isn't doing anything that I've nicely asked it to do...joining the domain, changing the computer's description, etc. Hmmm....???
    Monday, January 25, 2010 5:20 PM
  • When you run sysprep, it runs and shuts down the pc - then reboots? Or are you running it and nothing is happening? (just verifying how you are testing it) -- if it is running and not shutting your system down, its likely failing for some reason or another - or you're running it with the wrong switches (sysprep.exe -mini -quiet -reseal is the norm).  Usually errors are related to the hard-disk controllers in sysprep mass storage section, but other things can cause it as well.  You should be experiencing a shut down, rebooting and going through sysprep mini-setup.

    Also, with your drivers, ensure they are *extracted* down to the INF file level.  A lot of the time with packages drivers from vendors they're released in a setup.exe format etc, but to get to the inf files you need to install the drivers on a system, and grab it from the installation directory. Sometimes they're just readily available in the installer, etc.  It can be tricky, and definitely isn't the most uesr friendly process. You'll need the inf files to be in the directory you specify. Also, windows will prepend %SYSTEMDRIVE% to the driver paths, so after you've sysprepped your machine if you want to verify the path the system is actually using, run regedit and go to

    HKLM\Software\Microsoft\Windows\CurrentVersion - and check the DevicePath key to ensure your drivers are populating correctly.

    Here is a much more thorough review on sysprep and its usage: http://support.microsoft.com/kb/302577

    Essentially what you'll want to is specify all your options, then run sysprep on your machine, it will shut down - you can either reboot the system (to test going through mini-setup and all the initiation sequences) or capture and re-deploy.






    -Dustin
    Monday, January 25, 2010 5:32 PM
  • I have ran sysprep via CMD either just as sysprep or "sysprep -factory."  Either way it shuts down the machine, and when I start the PC again, it brings up a dialog saying what its doing (configuring user settings, etc) - but then now that I'm checking it, its not actually doing anything!  The drivers I do have are indeed extracted.  I run the setup.exe portion which extracts the files, then stop it before it actually begins the install.

    Monday, January 25, 2010 5:51 PM
  • yea don't use factory :) -mini -quiet -reseal should help your testing.
    D

    -Dustin
    Monday, January 25, 2010 5:57 PM
  • Well, dangit.  I accidentally opted to delete files when I was done, so I just lost the response file it created.

    But any way, it worked this time for joining the domain - changing the admin password didn't work for some reason (it gave an error message)...however, the driver thing still didn't work.  The wireless folder has 2 inf files...so hmm... 

    Any ideas?
    Monday, January 25, 2010 6:07 PM
  • you'll need to check the reg key, sysprep doesnt "directly" drive it, its a combination of sysprep populating that key and then initiating PNP Enumeration.

    you can test by manually populating that reg key with your appropriate paths/verifying sysprep populated it properly and running this in start -> run :

    RunDll32.exe Syssetup.dll,UpdatePnpDeviceDrivers

    this is the same action that kick soff during sysprep minisetup to initiate driver enumeration -> scanning that key -> installing device drivers when available/appropriate

    -Dustin
    Monday, January 25, 2010 6:10 PM
  • Ok, sorry :(, but I'm officially lost.

    What reg key do I/sysprep populate?  How do I find it?  I typed in RunDll32.exe syssetup.dll,updatepnpdevicedrivers and it just gave an error;
    "Error in syssetup.dll
    Missing entry:updatepnpdevicedrivers
    Monday, January 25, 2010 6:16 PM
  • pretty sure its case sensitive, copy/paste that command just how i typed it

    --- as for the key that sysprep populates:

    HKLM\Software\Microsoft\Windows\CurrentVersion - and check the DevicePath key to ensure your drivers are populating correctly.

    make sure the paths it put there are accurate, it will prepend %systemdrive% by default so your paths may be innacurate.

    -D

    -Dustin
    Monday, January 25, 2010 6:45 PM
  • You're genius.  I checked the key out and you hit it on the head, it was looking at %systemdrive%c:\ when I should've just had %systemdriver%\swsetup etc.

    Ok, now I've re-run sysprep with the new info in the sysprep.inf file, but the key still says %systemroot%\c:\ etc.  Do I have to delete or clear the key and run it again, or do I need to run factory then run it again?

    Thanks so much.

    Monday, January 25, 2010 7:05 PM
  • If you want to -test- enumeration, you can manually populate the key, and run that RunDLL command i pasted.  (if i recall correctly you need to reboot after changing the key - been a bit since i had to do this to test a driver)

    if you want to test sysprep, you'll need to fix your paths to read %SYSTEMDRIVE%\Swsetup, resysprep the machine, and start over that way

    -D

    -Dustin
    Monday, January 25, 2010 7:07 PM
  • Ok, so I corrected it manually in the reg key then did the RunDLL command and it fixed 3 of the 9 drivers!!!  Awesome!

    So now for a simpler question, but I doubt even close to being the last - do you have any idea why it would keep erroring on attempting to change the admin pwd?

    Monday, January 25, 2010 7:59 PM
  • Also, it looks like it is, by default, deleting the sysprep files as soon as I'm done each time.  Can I stop that somehow?
    Monday, January 25, 2010 8:04 PM
  • thats default to remove 'secure' info from the build (admin password..)

    just copy it elsewhere on your c:drive and move it to the sysprep folder each time you want to test
    -D

    -Dustin
    Monday, January 25, 2010 9:25 PM
  • Do you know why it would not successfully be changing the admin password when running sysprep?  It's giving me an error that it can't make the change, then obviously the auto logon fails.
    Monday, January 25, 2010 9:31 PM
  • Another ?

    Let's say I create a Windows XP image, except for the drivers that don't install by default, on an HP 6930p laptop.

    If I then deploy the image on to a Dell laptop, will all of the default drivers correct themselves, like for the chipset, etc, or will it install the HP drivers and leave them there (which would obviously cause a lot of problems).
    Monday, January 25, 2010 9:44 PM
  • New problem...sorry to keep posting on top of posts...

    For some reason now, Sysprep is not populating the DevicePath key.  After populating it manually, I got 6 of 8 drivers installed (I can't tell you how happy that makes me).  Now if I could just get Sysprep to do the work for me of populating the DevicePath key, I'd be set.

    Also, I suppose I will always have to install the network card first manually, else it will not join the domain obviously.  Is there a simpler way of doing that?  Or a command you can program to run after everything else in sysprep is done?
    Tuesday, January 26, 2010 2:01 PM
  • If the NIC driver is in your devicepath, it will automatically install it before trying to connect to the domain, as for the populating - if you are re-sysprepping an image over and over it can cause some wacky behavior, I've never had sysprep fail to populate that path for me unless i made it immensely long - like 22000+ characters etc.  You may want to get a task sequence set up in MDT so you can test everything in full from start to finish so its easier to rebuild your machines.

    you could try the quick-start guide here: http://myitforum.com/cs2/files/folders/108200/download.aspx for some good starting assistance in setting up your lab and getting familiar.






    -Dustin
    Tuesday, January 26, 2010 2:29 PM
  • What would be ideal, I think, would be to run an unattended installation from a CD, network share, or otherwise (USB external HD, etc), then once booted, install necessary software (via AD policy push, manual, etc), copy over the sysprep files and run sysprep.  Then you would have a sysprepped machine with the necessary software and Windows installed.

    The problem we have today is, we have probably 10 machine models in production at any given time, and that means we have 10 images.  And a lot of times even THAT isn't enough as we have may have 2 computers with the same HP model number but because of a part number change, one has Intel graphics and one has ATI.  So then we have an Intel graphics driver on a laptop with an ATI card.  It's a huge pain in the butt to have to deploy an image from Ghost, correct it, and then dump it back to the Ghost server.  Making a simple change to Windows, once you do it on 10 images and dumping them all back to the Ghost server, we're talking literally a full day or 2 of work for our guys downstairs.  It's completely inefficient.

    So now, my next question to you, Dustin, is this...Setup Mgr runs me through creating unattend.txt, but then what?  I've looked it up online and can't seem to find the next step.  I chose the option where you use the CD and I assume with the unattend file ON the CD, but I'm not finding any useful info.

    Ideally, I would copy all XP files including the unattend.txt file to a USB flash drive, then just boot to the USB flash drive, the unattended install happens, and I have a Windows XP box up in front of me, set up while I was away at lunch.  Is that realistic?  I suppose thats the whole point. 

    Thanks again for all your time.
    Tuesday, January 26, 2010 4:25 PM
  • Actually, Maik Koster noted in another thread - www.deploymentcd.com  - I hadnt realized Johan made this available publicly, but this is a truely incredible resource to get you started. The MDT can accomodate everything you're asking, and he has some fantastic lab tutorials to get you rolling, with videos assistance and walkthrough documentation.  Most of the questions you've had are answered there and his labs will get you up to speed very quickly.

    Give it a shot :)

    -Dustin
    Tuesday, January 26, 2010 4:32 PM
  • Alright, so I figured out why Sysprep wasn't populating the DevicePath key (fat fingered it), but now it's populating the key and the drivers aren't installing.

    Note: I reinstalled XP this morning and formatted to do away with everything I did yesterday.

    Tuesday, January 26, 2010 7:54 PM
  • Alright, so I figured out why Sysprep wasn't populating the DevicePath key (fat fingered it), but now it's populating the key and the drivers aren't installing.

    Note: I reinstalled XP this morning and formatted to do away with everything I did yesterday.


    And I'm reinstalling again right now as I type.
    Tuesday, January 26, 2010 8:18 PM
  • Dustin,
     I am now working on an unattended installation.  I have created unattend.txt and have copied all of the files from the CD down to a USB external drive.  So I have unattend files and the WinXP files on an external USB drive, which I would like to boot to.  Do you have any idea how I actually make it boot to that now?  In other words, where the files have to be?  I'm extensively searching Google but can't find the directions as cut and dry.  Most people asking questions online already have an idea.


    BTW, I got the Deployment CD and honestly, not so sure it will be of any use to me.  We aren't even using MDT at this point.

    Thanks again
    Wednesday, January 27, 2010 3:44 PM
  • Dustin,
     I am now working on an unattended installation.  I have created unattend.txt and have copied all of the files from the CD down to a USB external drive.  So I have unattend files and the WinXP files on an external USB drive, which I would like to boot to.  Do you have any idea how I actually make it boot to that now?  In other words, where the files have to be?  I'm extensively searching Google but can't find the directions as cut and dry.  Most people asking questions online already have an idea.


    BTW, I got the Deployment CD and honestly, not so sure it will be of any use to me.  We aren't even using MDT at this point.

    Thanks again

    I am going to ask out in the forum so I can alleviate the pressure I am putting on just one user.  Thanks for all of your help Dustin!
    Wednesday, January 27, 2010 3:49 PM
  • Just a quick word: you're right, it IS case sensitive :)
    Tuesday, March 09, 2010 7:11 PM
  • This is a very AMAZING thread.

    Please forgive me for reviving an old thread. Can someone PLEASE confirm and verify with me that C:\sysprep\sysprep.inf must exist to automate a Mini-setup installation? I have this file sitting here. It works during a Windows XP Installation but it does not automate my Windows XP Mini-Setup installation.

    Friday, April 01, 2011 4:22 AM
  • I read this post and some answers bother me.

    MDT has to write in the sysprep.inf when it gathers the drivers or I don't see how it can inject the drivers.

    Now, when we do "manual" sysprep with sysprep -bsdm we build the massStorage Section and we add others drivers like AHCI by editing sysprep.inf.

    Scenario :

    My image is ready and in the mdt structure. I've got a raid driver I didn't add during the image creation.

    If I add it to my MassStorage folder in MDT. Does MDT add the lines in sysprep.inf or not when installing Xp ? 

    Sunday, February 12, 2012 2:26 PM