I thought I'd document how to setup the new Sysprep process equivalent on Windows 2008 since the old setupmgr tool for making sysprep.inf's doesn't exist anymore (and neither does the sysprep.inf file itself).
The first step is acquiring the Windows Automated Installation Kit (WAIK) from somewhere. You can get this package in ISO file format from Microsoft's website at http://www.microsoft.com/downloads/details.aspx?FamilyID=94bb6e34-d890-4932-81a5-5b50c657de08&DisplayLang=en. The download is about an 800MB install on a Windows Server 2003 SP2 x86 machine.
The tool of choice for building your Sysprep configuration is the Windows System Image Manager (WSIM). When you start it you'll get a blank screen like this:

The first step is to catalog the image file. You can do this from Tools>Create Catalog, selecting your install.wim and then what image(s) to catalog. I'm setting up Windows Server 2008 Enterprise so I selected the appropriate option. The final three choices are the server core variants:

All of the settings you will want to setup in your unattend.xml file are in the tree under Windows Image. The documentation for all the settings can be found at http://technet2.microsoft.com/WindowsVista/en/library/69eee519-55a6-440d-ab94-56330ef57e291033.mspx. This link shows a mapping table between the sysprep.inf file and the new unattend.xml format.
All of the various settings can be applied during different passes of the setup process which sysprep will trigger. You can read about these passes here. I built a simple unattend file just for sysprep'ing my base image which includes settings in the generalize, specialize, and oobeSystem passes. All of the settings I chose are outlined below.
My answer file tree:

Disabling the initial configuration dialog:

Disabling auto-starting the server manager application:

Setting my product key, timezone settings, and my name:

Configuring the screen resolution and color depth - 1280x960 is what works in VMWare full screen mode with the tabs across the top:

Configuring setup not to show me the EULA again:

Configuring setup to install a default local administrator account password:

One of the things I discovered doing this is that unlike Sysprep from Windows 2000 - 2003, the unattend.xml file isn't deleted at the conclusion of the Sysprep process. When down-level Sysprep completes, it deletes the c:\sysprep folder. In order to replicate this functionality, you can put a command in to delete the unattend.xml file in the SetupComplete.cmd batch file (which must be located in c:\windows\setup\scripts\) which gets called at the end of Sysprep. Reference this link for more info.
I put a simple one line command in my SetupComplete.cmd file:
del /Q /F c:\windows\system32\sysprep\unattend.xml
In order to run Sysprep you'll need to use a new command. The old Sysprep user interface that was there in Windows 2000 – Windows Server 2003 doesn't really exist anymore. All of the Sysprep command line switches are documented at http://technet2.microsoft.com/WindowsVista/en/library/72cc64e2-a0f3-4516-84fc-097577127fc91033.mspx.
sysprep /generalize /oobe /shutdown /unattend:sysprep.xml
So far this process is working fine for me with Windows Server 2008 Enterprise x86 full installs. I haven't tried it with server core yet, but if it's different I'll post something about that.
Comments, Trackbacks, & Pingbacks
#1 re: How to Sysprep in Windows Vista and Windows Server 2008
Monday, April 07 2008 12:50 PM by Anand Kumar Joshi#2 re: How to Sysprep in Windows Vista and Windows Server 2008
Monday, April 14 2008 1:14 PM by JHizzeI am unable to get Windows Server 2008 to prompt me for a computer name after syspreping a machine. I would love to be prompted for a computer name upon first boot, after sysprep has been run, but I can't get this to work. The documentation states you should be prompted for a computer name if the ComputerName field is left out of the XML answer file, well this is not the case for me. I received a prompt when syspreping a Vista machine, but no dice for W2K8. Anyone have any suggestions or advice?
Thanks,
Jason
#3 re: How to Sysprep in Windows Vista and Windows Server 2008
Thursday, April 24 2008 9:05 AM by JoeThe SetupComplete.cmd is not working to delete the sysprep.xml file at the end of a sysprep job. The sysprep.xml file is in the sysprep folder. If I do a Run as Admin on the SetupComplete.cmd, the file will get deleted. Help? Thanks.
#4 re: How to Sysprep in Windows Vista and Windows Server 2008
Tuesday, January 20 2009 3:27 PM by MiguelHello Brian,
First I want to thank you for your article and the detail in which you conveyed the how to's; in's & out's. (This was right on time!)
However, I have now been presented with a couple of options to implement and I'm having a real hard time with each.
1. Moving the user profiles from the C: drive to the D:
2. Creating a "Default user profile"
I have tried to read through all the jargon and admit it's very upsetting. (My tech to regular english book must be faulty or missing many pages!)
Can you offer any assistance?
Regards,
Miguel
#5 re: How to Sysprep in Windows Vista and Windows Server 2008
Tuesday, January 20 2009 3:36 PM by Paul HarveyFor those who have more basic needs, there is a much simpler method than playing around with the Windows System Image Manager. You can just launch the sysprep utility directly, which comes up with a minimal graphical user interface. There are also command-line parameters, which will display if you type sysprep /?. The sysprep utility is installed with Windows 2008, in the %WINDIR%\system32\sysprep directory. Make sure to pick the "Generalize" option!
#6 re: How to Sysprep in Windows Vista and Windows Server 2008
Thursday, February 05 2009 10:38 PM by GFound this:
#7 re: How to Sysprep in Windows Vista and Windows Server 2008
Wednesday, March 18 2009 3:35 PM by Mel K.The title of this article is misleading—please change it. You are NOT using sysprep.exe, so don’t confuse people with that title. I was thinking about syspreping my test server a while back and ran into this article. I saw how many steps were involved and I didn’t even bother.
Now I’m revisiting the sysprep thing again and found the article at http://www.jameskovacs.com/blog/HowToSysprepWindowsServer2008.aspx. That is a true “sysprep” and is what I was looking for, and is much simpler.
#9 re: How to Sysprep in Windows Vista and Windows Server 2008
Friday, April 17 2009 3:56 PM by Chandan PatralekhIts really a nice article. In case you want to have one single page with structured contents for learning more about Windows 2008 you may want to visit the page. Its
Happy Learning.
#10 re: How to Sysprep in Windows Vista and Windows Server 2008
Friday, April 17 2009 3:57 PM by Chandan PatralekhIts really a nice article. In case you want to have one single page with structured contents for learning more about Windows 2008 you may want to click on my name.
Happy learning.
#11 re: How to Sysprep in Windows Vista and Windows Server 2008
Friday, May 29 2009 6:35 PM by dominiqueHello.
I used the Windows Image System Manager and opened the install.wim from the Windows Server 2008 Std. and Ent. Eds. x86 through Tools > Create Catalog and I am getting an error:
QUOTE
4:22 PM :
4:22 PM : Windows System Image Manager execution failed.
4:22 PM :
4:22 PM : System.Reflection.TargetParameterCountException: Parameter count mismatch.
at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
at Microsoft.ComponentStudio.Common.ErrorReporting.ShowErrorConfirmation(Form owner, String message, Exception ex, String caption, MessageBoxButtons buttons, MessageBoxDefaultButton defaultButton, String servicingPath)
at Microsoft.ComponentStudio.CatalogGenerator.CreateCat(ProgressDialog pd, Object o)
at Microsoft.ComponentStudio.Controls.ProgressDialog.ThreadProc()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Could it be the source of my issues...
Should I use another file install.wim?
Thanks,
- Dom
#12 re: How to Sysprep in Windows Vista and Windows Server 2008
Friday, May 29 2009 7:08 PM by dominiquethis could interest somebody....
Because of the changes in the servicing stack in Windows Vista with Service Pack 1 (SP1) and Windows Server 2008, Windows System Image Manager (Windows SIM) cannot create catalog files for some Windows images of different architecture types. The following list describes the Image Manager architecture types and catalogs that can be created for each one.
x86 Windows SIM:
Can create catalogs for x86, x64, and Itanium-based Windows images.
x64 Windows SIM:
Can create catalogs only for x64 Windows images.
Itanium-based Windows SIM:
Can create catalogs only for Itanium-based Windows images.
#13 re: How to Sysprep in Windows Vista and Windows Server 2008
Friday, June 12 2009 4:12 AM by serenity CloverGreta article but I am still unclear as to where to put the answer file once its created?
Do I put it in the same folder as the sysprep.exe which is C:\windows\system32\sysprep?
And then run sysprep.exe?
Thanks a bunch for any info.
#14 re: How to Sysprep in Windows Vista and Windows Server 2008
Wednesday, August 19 2009 9:50 AM by UltimaHostsThanks for the great article. Saves us a lot of time even though install Windows 2008 is incredibly fast compared to Windows 2003.
#15 re: How to Sysprep in Windows Vista and Windows Server 2008
Monday, September 28 2009 2:58 PM by Chad NessGood article, thanks! One note - I believe you intended the sysprep line to actually read /sysprep:unattend.xml not /sysprep:sysprep.xml.
To answer one question above, save the file you make in WSIM as c:\windows\system32\sysprep\unattend.xml .
#16 re: How to Sysprep in Windows Vista and Windows Server 2008
Saturday, November 07 2009 6:58 AM by Peter DittyI think this is easier:
#17 re: How to Sysprep in Windows Vista and Windows Server 2008
Thursday, December 03 2009 7:15 PM by Dino MausioHow do we do sysprep for win 7.
we do PC builds for clients and are currently facing issues.
we are using sysprep version 2.0
Please advise
#18 re: How to Sysprep in Windows Vista and Windows Server 2008
Friday, January 15 2010 9:36 AM by Abhishek singhhello,
i got problem with my sysprep.xml file...when i am running it it's not replicating the drivers after the restart...
tellme if i am doing mistakes....how to add driver in sysprep for capturing the image for win server 2008 using winpe2.1 and imagex tool....
capturing part will be ok once my sysprep is ready......
so,need help in sysprep making..
pls help..
#19 re: How to Sysprep in Windows Vista and Windows Server 2008
Friday, January 15 2010 9:37 AM by Abhishek singhhello,
i got problem with my sysprep.xml file...when i am running it it's not replicating the drivers after the restart...
tellme if i am doing mistakes....how to add driver in sysprep for capturing the image for win server 2008 using winpe2.1 and imagex tool....
capturing part will be ok once my sysprep is ready......
so,need help in sysprep making..
pls help..
#20 re: How to Sysprep in Windows Vista and Windows Server 2008
Saturday, May 22 2010 9:50 AM by TirouHi Desmond
I follwed your procedures and it worked like a charm. Thanks for the time and effort posting and sharing these procedures. I searched pretty hard on the net for a simple sysprep answer file solution and I am sure your's is the only one out there.
I have few doubts and would appreciate if you got the time to clarify.
1. I see you used 'amd...' components. I am using intel x64. I am looking for a x64 settings under components, but I could not find any. Only x86 is there. I used 'adm...'components on my x64 win2k8r2 VM. It worked fine. I am wondering is this the right way. I am using MDT 2010 and downloaded AIK via MDT.
Thanks, Tirou
Thanks, Tirou
#21 re: How to Sysprep in Windows Vista and Windows Server 2008
April 16, 2008 4:44 PM by does not delete in 2003#22 re: How to Sysprep in Windows Vista and Windows Server 2008
May 5, 2008 6:51 AM by Current VirtualCenter customization wizard needs changes for Server 2008 | VM /ETCPingBack from http://vmetc.com/2008/05/05/current-virtualcenter-customization-wizard-needs-changes-for-server-2008/
#23 re: How to Sysprep in Windows Vista and Windows Server 2008
May 6, 2008 11:35 AM by microsoft server 2000 iso#24 re: How to Sysprep in Windows Vista and Windows Server 2008
August 7, 2008 11:28 PM by netAndsysAdmin.com » Blog Archive » How to Sysprep Windows 2008PingBack from http://www.netandsysadmin.com/?p=5
#25 re: How to Sysprep in Windows Vista and Windows Server 2008
September 22, 2008 2:58 PM by Sysprep Windows 2008 « Virtrob’s WeblogPingback from Sysprep Windows 2008 « Virtrob’s Weblog
#26 re: How to Sysprep in Windows Vista and Windows Server 2008
August 13, 2009 7:09 AM by Windows Server 2008 Deploy From Template Guest Customization Update | VM /ETCPingback from Windows Server 2008 Deploy From Template Guest Customization Update | VM /ETC
#27 re: How to Sysprep in Windows Vista and Windows Server 2008
August 13, 2009 7:11 AM by Windows Server 2008 Deploy From Template Guest Customization Update | VM /ETCPingback from Windows Server 2008 Deploy From Template Guest Customization Update | VM /ETC
#28 re: How to Sysprep in Windows Vista and Windows Server 2008
October 4, 2009 3:43 PM by How to Sysprep in Windows Server 2008 R2 and Windows 7About eighteen months ago, I blogged about how to run Sysprep for Windows Server 2008 and this has turned out to be the most popular article on this site by a long shot, so I figured I'd update it for Windows Server 2008 R2 (and Windows 7). If you never
#29 re: How to Sysprep in Windows Vista and Windows Server 2008
October 4, 2009 4:34 PM by How to Sysprep in Windows Server 2008 R2 and Windows 7About eighteen months ago, I blogged about how to run Sysprep for Windows Server 2008 and this has turned
#30 re: How to Sysprep in Windows Vista and Windows Server 2008
April 21, 2010 8:40 AM by Active Directory « Microsoft Student PartnersPingback from Active Directory « Microsoft Student Partners
#31 re: How to Sysprep in Windows Vista and Windows Server 2008
May 21, 2010 1:13 PM by How to Sysprep in Windows 2008I thought I'd document how to setup the new sysprep process equivalent on Windows 2008 since the old setupmgr file for making sysprep.inf's doesn't exist anymore (and neither does sysprep.inf). The first step is acquiring the Windows Automated Installation
#32 re: How to Sysprep in Windows Vista and Windows Server 2008
July 10, 2010 10:07 PM by How to Build a Sysprep Answer File for ImagingNote: This post discusses Sysprep as it pertains to Windows 2000, Windows XP, and Windows Server 2003. If you’re working with a newer version of Windows, check out these posts: Windows Vista and Windows Server 2008 Windows 7 and Windows Server 2008 R2



Hi,
I am trying to do a simple unattended install of Win 2k8 using the original source folder from the DVD.
My problem is that every time I start the unattended install, I get an error stating that "Windows was unable to determine the language to install". This happens despite me specifying the language under the x86_Microsoft-Windows-Internation-Core-WinPE_neutral component.
I have tried the same script on Vista Business, and it works flawlessly.
Is it possible for you to give me a copy of a working xml script for win 2008?
I just cant seem to figure out where I am going wrong.
Thanks
Anand
Anand.Joshi@lsi.com