Unattended XP Installs with Windows Deployment Services
Reference for myself (and anyone else that’s interested) - here’s my unattend.xml file for installing Windows XP SP2 completely unattended. Using this in conjunction with a sysprep.inf file, you can achieve a completely unattended XP install using Windows Deployment Services.
Firstly, you need an unattend.xml file. This tells the Windows PE boot device what to do - what language to use, what credentials to use connecting to the WDS server, how to partition the disk and which image to deploy. You specify this at the server level - in the WDS console, right-click on your server name, choose properties and the client tab. Tick the Enable unattended installation check box and browse to your unattend.xml file - good practice dictates storing this in your WDSClientUnnatend folder under the RemoteInstall share.
My XP unattended file (called, inventively, xp_unattend.xml) looks like this:
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DiskConfiguration>
<WillShowUI>OnError</WillShowUI>
<Disk wcm:action="add">
<CreatePartitions>
<CreatePartition wcm:action="add">
<Order>1</Order>
<Type>Primary</Type>
<Extend>true</Extend>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<ModifyPartition wcm:action="add">
<Active>true</Active>
<Format>NTFS</Format>
<Label>WinXP</Label>
<Letter>C</Letter>
<Order>1</Order>
<PartitionID>1</PartitionID>
</ModifyPartition>
</ModifyPartitions>
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
</Disk>
</DiskConfiguration>
<WindowsDeploymentServices>
<Login>
<Credentials>
<Domain>your domain</Domain>
<Username>domain username</Username>
<Password>password</Password>
</Credentials>
</Login>
<ImageSelection>
<WillShowUI>OnError</WillShowUI>
<InstallImage>
<ImageName>Image Name as displayed in WDS</ImageName>
<ImageGroup>Image Group</ImageGroup>
<FileName>WIM Image Filename</FileName>
</InstallImage>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>1</PartitionID>
</InstallTo>
</ImageSelection>
</WindowsDeploymentServices>
</component>
</settings>
</unattend>
The next part of our completely unattended setup is an XP sysprep.inf file. Again you can store this on the WDS server - navigate to your RemoteInstall share again and under the Images folder you’ll see your WDS Image Groups. As my image is called "winxpsp2.wim", I’ll create a folder called winxpsp2. In this folder, I’ll create the $OEM$ directory structure, within which I’ll put a folder called $1, within which I’ll make a folder called sysprep, which is where the sysprep.inf file will go. Phew! For reference, in my enviroment, this means that we’re looking at D:\RemoteInstall\Images\Windows XP\winxpsp2\$OEM$\$1\sysprep\sysprep.inf.
Here’s my XP sysprep.inf file:
;SetupMgrTag
[Unattended]
OemSkipEula=Yes
InstallFilesPath=C:\sysprep\i386
[GuiUnattended]
AdminPassword="Your Admin Password Here"
EncryptedAdminPassword=NO
OEMSkipRegional=1
TimeZone=85
OemSkipWelcome=1
[UserData]
ProductKey=Your Product Key Here
FullName="Your Name Here”
OrgName="Your Company Name Here"
ComputerName=%MACHINENAME%
[TapiLocation]
CountryCode=44
Dialing=Tone
AreaCode=020
LongDistanceAccess="9"
[RegionalSettings]
LanguageGroup=1
[SetupMgr]
DistFolder=C:\sysprep\i386
DistShare=windist
[Identification]
JoinDomain=%MACHINEDOMAIN%
DoOldStyleDomainJoin=Yes
[Networking]
InstallDefaultComponents=Yes
Using these two files and Windows Deployment Services on Windows Server 2003 SP2, I’m instaling PC’s in a completely unattended fashion from the network. Easy!
This entry was posted on Wednesday, August 15th, 2007 at 2:43 pm and is filed under Windows Server 2003. Find similar posts by selecting any of the following tags: . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
on Tuesday October 2 2007 at 7:12 pm Troy wrote:
Kinda-Sorta when I try to add the .xml file for unattended mode my server tells me: “This image version does not support adding an unattended setup file using this method. For more information please see the Windows deployment services documentation.”
What? I’ve customized an XP Pro SP2 install with MS Office etc then ran sysprep to reseal it. Next, it shutdown and during boot I ran the “Capture Image” option from my WDS server. This was setup using the info found in article 81873 Windows Deployment Services Update Step-by-Step Guide for Windows Server 2003.
So, my captured image is on the WDS server in the images folder. Now, I’ve followed the outline above until I get to the error above.
Help?
on Wednesday October 3 2007 at 8:22 pm Troy wrote:
I just saw my mistake… The option to add the unattend.xml file to the image is NOT at the image level but at the server. This is what was outlined, I just read between the lines and was a step or two early.
Thanks!
on Thursday October 4 2007 at 8:00 pm Eddie Ortiz wrote:
I did everything according your spec but some im getting an error:
WdsClient: An error occured while communicicating with the Deployment Service server.
If i unclick the Enable Unattended Installation. The process will work it just wont be unattended. When I use your .xml file i modified it to the right settings. ill paste here:
OnError
1
Primary
true
true
NTFS
WinXP
C
1
1
0
true
ad
eddie
******
OnError
xpsp2_unattended.wim
xpimage
xpsp2_unattended.wim
0
1
and here is my directory structure for the sysprep
E:\RemoteInstall\Images\XPImage\xpsp2_unattended\$OEM$\$1\syspref.inf
;SetupMgrTag
[Unattended]
OemSkipEula=Yes
InstallFilesPath=C:\sysprep\i386
[GuiUnattended]
AdminPassword=*
EncryptedAdminPassword=NO
OEMSkipRegional=1
TimeZone=35
OemSkipWelcome=1
[UserData]
ProductKey=xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
FullName=”SEMEC”
OrgName=”SEMEC”
ComputerName=*
[SetupMgr]
DistFolder=C:\sysprep\i386
DistShare=windist
[Identification]
JoinWorkgroup=WORKGROUP
[Networking]
InstallDefaultComponents=Yes
SO im not sure what Im doing wrong. any ideas?
Edited 30th November by Rob - removed Windows Product Key!
on Thursday October 4 2007 at 8:07 pm Eddie Ortiz wrote:
Nevermind figured it out.. Oh. rob please delete my top post.
on Sunday October 7 2007 at 11:23 pm Chaim Krause wrote:
I am having a difficult time understanding how to use WDS to do a fresh install of Windows XP SP2.
Everything I have read so far talks about using an working computer with Windows XP SP2 already installed and using Sysprep then imaging it. I don’t want to use an existing system. I want to use the files from the Windows XP SP2 installation CD. For example, I want to create a new virtual machine using VMware, boot that vm, connect to WDS via PXE and do a brand new unattended installation of WinXPSP2 using the setup files I created using Setup Manager.
I read through the posting above and see,
I can’t figure out how to create winxpsp2.wim. I assume this is not an image of an existing computer, but one made from the WinXPSP2 install disk.
Can somebody help me out please. I am going nuts. :)
on Tuesday November 27 2007 at 9:20 pm Koi wrote:
Is there anyway for the computername to be entered manually before the install of the image.
For example machine name to be entered after PE has loaded and then the entered computername to amened the unattend.txt? Ths could then run the XP setup with the custom unattend file.
Regards.
on Tuesday January 22 2008 at 11:41 am Tall Paul wrote:
Hi
Excellent instructions.
I seem to be having a different problem to everyone else. I don’t have any issues with the .xml file but I am having problems with the sysprep file.
I have a folder structure exactly the same as yours, however when I start a new build it seems to completely ignore the sysprep file.
I get the image OK, but I have to install it attended. Nothing is pre-filled etc.
Any ideas what I am doing wrong?
Many thanks
Paul
on Thursday February 7 2008 at 7:53 am Johan wrote:
Hello..
I agree with Tall Paul .. Excellent instructions !! But I also have the same problem with the sysprep file.. my image is installed but the sysprep.inf file is totally ignored. When I read the help file they say that the sysprep.inf should be put in the $OEM$ directory.. I tried that as well without success..
Tall Paul, did you find a solution for this behavior ?
Thanks
on Thursday February 7 2008 at 9:00 am Johan wrote:
I found the solution to my problem.. when you run sysprep on the machine you must check the Mini-Setup before you press reseal, otherwise the sysprep will be ignored.
on Friday February 8 2008 at 10:47 am carl wrote:
Hi
Very good instructions but Iam having some difficulties with sysprep.inf after the image is installed the sysprep file does not exist, followed your example exactly but can’t get it to work. Also either I’m missing the point or it is doing exactly what it should, when the client starts up you have to enter all the windows details to finish the install i.e. product key, local password, etc and then run the sysprep to join to domain and finish install fully. In the help files of the Windows System Image Manager it explains that you can also add things like product key however it does say it is for Windows Vista family but it also says that about disk configuration. So I have added the product key to the XML but it does not work should it work? If it is possible to get the product key in it would miss out a typing prduct key in, and if the sysprep file is to be run after install could this not be built in to the client image.
Regards
on Friday February 8 2008 at 1:24 pm JPenrose wrote:
Thanks Rob.
I’ve followed your other WDS guides and found them quite helpful. This is just what I’ve been looking for.
Cheers!!
on Friday February 8 2008 at 1:38 pm JPenrose wrote:
Carl,
You need to run sysprep before you capture the image to your WDS server. You do this by executing sysprep.exe from the sysprep folder you put on the C: drive of the machine you are capturing. Windows will delete this folder when the process is finished.
If your clients are starting and asking for setup information then a sysprep.inf file is not being read. This file is necessary to instruct Windows on how to configure itself. Running sysprep after the fact doesn’t work; it’s a before capture process to prep the machine (strips uniqueness) for mass roll out.
WSIM can only generate XML unattended files for the Windows Vista OS so you need to use a combination of unattend.xml and sysprep.inf as shown by Rob above. If you run SIM and show an XP wim file it barfs and fails.
You need to construct the folder hierarchy as described by Rob so your sysprep.inf file (made using setupmgr.exe from the deploy.cab) gets read during the imaging process.
As far as putting a product key into the unattend.xml, I’m sure it can be done but since the sysprep.inf (in this tutorial) is providing it, it’s not necessary.
Good luck!
on Friday February 8 2008 at 2:07 pm carl wrote:
To JPenrose
I have been using sysprep to prepare to image but what I have not been doing is using the mini setup and shut down to pre-configure all the settings in the image before copying it to the WDS server. Would this solve all my problems because I would not require the sysprep file attached to the image. I realise this would make every machine identical. Could I specify an additional file in the sysprep image which would rename each client differently from a share ?
I could not see the wood for the trees
Thanks JPenrose
on Monday February 11 2008 at 1:42 pm JPenrose wrote:
That’s a darn good question Carl and one I’m currently researching. I want to be able to have the client parse a file to get a name and then join itself to the Domain. There’s always pre-staging but I’m looking for something less labor intensive.
I’ll report back to this thread when I find a solution.
on Monday February 11 2008 at 9:22 pm CVollbracht wrote:
Hey Rob & Carl,
I’m having difficulties naming the PC’s and joining them to ActiveDirectory. Here is the scenario:
Right now what I’m doing is resealing the machines with sysprep and the sysprep.inf copied on c:\sysprep, and the name the computer configures is the one specified on the sysprep.inf file. When I configure the “New Client Naming Policy” on WDS the computer still configures the name specified on the sysprep.inf, if I don’t put the “ComputerName” key on the sysprep.inf file, the minisetup asks for the computer name during the inicial setup/startup, so the initial setup is always ignoring the “New Client Naming Policy” on the DirectoryServices Tab on WDS.
What I need to know is, in your procedure, how do you close or which parameter do you use on sysprep, right now I’m using Reseal and MiniSetup, and do you seal the machine with the sysprep.inf file included in the image or just place the sysprep.inf on the path you previously described?
Thanks for the help,
Carlos V.
on Wednesday February 13 2008 at 10:02 am Dave wrote:
@JPenrose and @carl
I have been using MySysprep to circumvent HAL restrictions when deploying hardware independent XP images via WDS. However, MySysprep will also allow you to rename machines in many different combinations at installation (and join to the domain) and may help do what you want.
I’ve also written (or cobbled together from a variety of sources) a series of step-by-step type guides on building and deploying generic hardware independent XP images using WDS. This covers the use of sysprep and sysprep.inf files and may be of some use to you guys.
I hope that there is something in there that helps to fill in any gaps as it took me ages to collect together and sift through all the conflicting advice and guidance and know how frustrating it all can be!
Dave.
on Thursday March 27 2008 at 11:56 am WDS-Image auf Basis eines Windows XP PCs erstellen » Stefan Macke wrote:
[...] Unattended XP Installs with Windows Deployment Services [...]
on Thursday April 10 2008 at 10:50 pm John wrote:
This saved my bacon. As posted by someone above the “help” file (yes you can laugh now) says to put the sysprep.inf file in the $OEM$ directory, not the $OEM$/$1/sysprep directory. Now my unattended install works perfectly. I’ve been searching the web for a week looking for this solution, and this is the only site that had it.
THANK YOU ROB!
JB
on Monday May 5 2008 at 1:36 pm Philippe Vranken wrote:
Hi, i have a question.
You specify this at the server level - in the WDS console, right-click on your server name, choose properties and the client tab. Tick the Enable unattended installation check box and browse to your unattend.xml file
How can you link these xml & sysrep.inf files to images if you have several XP images?
on Wednesday May 28 2008 at 8:55 am McRonald wrote:
Hello,
Rob you got some nice Guides about the WDS, It really helps me with a lot.
My only question is, How did you make the XML files for the Windows XP Sysprep Image?
Because I do can create xml files with ‘Image manager’ for my unattended Vista Images.
But if i want to do it on the same way for the Windows Xp image ill get some errors.
Does ‘image Manager’ not support sysprepe images or did i something wrong with sysprep?
ok, 2 questions.
Thanx for the help,
McRonald.
on Friday June 6 2008 at 4:01 pm Justin wrote:
I’m having a little trouble using the %MACHINENAME% tag. I created my image, ran sysprep, (mini-setup, reseal), captured it in WDS and then imaged a computer with it. My only problem is when the sysprep.inf file is copied to the computer, that tag gets deleted.
This is what happens:
before
….
ComputerName=%MACHINENAME%
…
After
…
ComputerName=
…
Anyone have any ideas as why this may happen?
Thanks,
Justin
on Thursday June 19 2008 at 12:24 pm thomas wrote:
Hi there for those who wanna build a wds im using this one..suits just fine for me!
http://vkgbijdehand.nl/up…crosoft_WDS_Server_EN.pdf
Thanks for :
As my image is called “winxpsp2.wim”, I’ll create a folder called winxpsp2. In this folder, I’ll create the $OEM$ directory structure, within which I’ll put a folder called $1, within which I’ll make a folder called sysprep, which is where the sysprep.inf file will go. Phew! For reference, in my enviroment, this means that we’re looking at D:\RemoteInstall\Images\Windows XP\winxpsp2\$OEM$\$1\sysprep\sysprep.inf.
This gotten me further
on Saturday August 16 2008 at 10:43 am Umesh wrote:
Hi Rob,
Thanks for publishing such a useful information.
I have a question regarding attended.xml , As we are using only one xml file which is mapped at server level.If we have several images of XP,Windows server 2003 and Vista how this will function?
Thanks in advance,
Umesh
on Saturday August 30 2008 at 1:51 am Quang wrote:
I run into the same problem as Umesh - Can’t not deploy a capture image for XP or Server with multiple partitions and different partition size - WDS is not too flexible to detect the image for XP as single partition or server/vista with multiple partition - If anyone know the work around, please post your solution.
I was able to tweek for unattended install mode (for single or multiple partition) but I can’t get it to work under deploy capture image (preconfigure setting) — it only able to image to a whole single partition
Thank you in advance.
Quang
on Tuesday November 11 2008 at 1:07 pm Bob wrote:
Great guide, thanks
on Monday December 29 2008 at 11:34 am tom wrote:
works great - unattended all the way through!
however is there anyway to have this work for multiple images?
Ideally what i would like is to boot into different WinPE sessions from PXE which will then load their own unattended.xml files and point to specified image and settings.
e.g. when i hit F12 to network boot i get presented with a range of WinPE’s to boot into
Desktop Image
Laptop Image
Workstation Image