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: unattended, wds, Windows XP. 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
on Wednesday, March 25, 2009 at 4:06 pm Jason wrote:
Why would I need a new sysprep.inf file when the one on my image is setup perfect?
If I need to put one in this folder \Images\Windows XP\winxpsp2\$OEM$\$1\sysprep, do I include my long list of OEMPNPDriversPath=? or SysprepMassStorage??
Can it be the same one as on my image?
Thanks,
Jason
on Monday, May 11, 2009 at 9:49 am Martin wrote:
Hello,
where to put the sysprep.inf?
Is the modified sysprep.inf needed on the client under c:\sysprep , too?
Where to save the file on the WDS server?
Bye Martin
on Monday, May 18, 2009 at 8:27 am Rob wrote:
Jason,
I can’t remember exactly from memory (it’s been a while since I did this now) but I think that WDS over-wrote whatever sysprep file you included on the image. Give it a go and see if it still works; if not I’d copy the sysprep file to the server.
Hope this helps
on Tuesday, May 26, 2009 at 2:50 am More Windows Deployment Services Information wrote:
[...] Unattended XP Installs With Windows Deployment Services [...]
on Tuesday, May 26, 2009 at 8:51 am Pankaj wrote:
I get error with seems my wds doesn’t understand this syntax. Also i can’t open same in internet explorer erro:
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
——————————————————————————–
The operation completed successfully. Error processing resource ‘file:///REMINST/WdsClientUnattend/WDSClientUnat…
on Wednesday, June 3, 2009 at 1:09 pm matt wrote:
I read some documentation that suggested that WDS appended any sysprep.inf in the $OEM$ folder to the one found in the .wim image.
Depending on your setup, you could put the common parameters on the image, and have specifics on the server, which you could change easier, without using imagex.
on Tuesday, June 9, 2009 at 1:34 pm Rodrigo wrote:
Hi Rob
Great site, I was searching for this and you got the answer man. awesome!
In addition to your great guide I can contribute for those who want to deploy multiple images.
Just modify your unattend.xml file in \remoteInstall\WdsClientUnattend\ so that the part telling the WDS witch image to use is empty, like this..
And that’s it. Now when you PXE boot your client machine and choose “Deploy Windows” (or whatever your bootimage is) the only question asked when the bootimage loads is to choose the image you want to deploy, the rest then is completelly unattended.
Thanx again!
/R
on Sunday, June 21, 2009 at 7:12 pm Michael wrote:
Rodrigo,
I can not make work more than one images.
On works perfect with Rob’s files xml and sysprep.ini
From your explanation it’s not very clear what to do.
You say:
Just modify your unattend.xml file in \remoteInstall\WdsClientUnattend\ so that the part telling the WDS witch image to use is empty, like this..
Like what?
In xml install section there is an option to add the name of the second image.
But what about second sysprep.ini. should I create a new folders for the second sysprep in
D:\RemoteInstall\Images\Windows XP\winxpsp2\$OEM$\
Please give detailed explanation for adding second image if you did it.
Thx.
Michael.
on Monday, August 17, 2009 at 3:34 pm WDS - ein paar Fragen - Forum Fachinformatiker.de wrote:
[...] ich merk schon.. meine recherchen sind schneller als ihr HIER findet man genau das, was ich gesucht habe! Ich glaube falls ich noch weitere Fragen haben sollte, [...]
on Friday, August 21, 2009 at 10:10 am Christian wrote:
Hello Rob,
thanks for your Article, it saved me alot of time ;)
but placing the sysprep.inf on the Reminst share dowsnt work for me. I simply put it on the client folder “sysprep” which i used for sysprep the Masterinstallation.
thx
Chris
on Tuesday, September 29, 2009 at 8:29 am simon wrote:
hi,
i got a problem while joining the domain at the miniinstall – the installer doesn’t accept the username/password :-(
i use this configuration:
[Identification]
JoinDomain=%MACHINEDOMAIN%
DoOldStyleDomainJoin=Yes
~ i think he tries to use the username, used to logon to the wds server (uses correct domainname), but it doesn’t work
when i give a specific username in the sysprep.inf it doesn’t work either..
[Identification]
JoinDomain=%MACHINEDOMAIN%
DoOldStyleDomainJoin=Yes
DomainAdmin=foo\bar
DomainAdminPassword=mypassword
any ideas?
on Monday, October 19, 2009 at 1:34 pm rikard wrote:
Hi,
I use the two files described above to install XP and it works perfectly!
It would however be great if anyone knows how you edit the sysprep file so that you also will be able to define what OU the computer will end up in? I tried the following but the WDS just ignores it and instead uses the OU defined by the WDS.
[Identification]
JoinDomain = %MACHINEDOMAIN%
DoOldStyleDomainJoin = Yes
MachineObjectOU = “OU = WDSNotebooks,DC = mydomain,DC = net”
It would be really great if you could put Notebooks in one OU and Workstations in another.
BR
Rikard
on Wednesday, October 28, 2009 at 3:28 pm sysprep xp for wds « swyda_techblog wrote:
[...] http://robwhitehouse.com/windows/windows-server-2003/unattended-xp-installs-with-windows-deployment-... [...]
on Friday, October 30, 2009 at 3:42 pm U.K. wrote:
Is it normal, that the installation process is asking me to select the image I want to install? I have configured it in the unattend.xml file (InstallImage), just as the example above, but the installer keeps asking me for the install image …. ?
I read Microsoft-Windows-Setup is only Vista or higher compatible, but my boot image is vista anyway …
on Monday, November 16, 2009 at 1:28 pm more sysprep file details « swyda_techblog wrote:
[...] http://robwhitehouse.com/windows/windows-server-2003/unattended-xp-installs-with-windows-deployment-... [...]
on Thursday, January 7, 2010 at 10:58 am Anton Gildebrand wrote:
Hi Rob!
Excellent guide!
But i am having some problems with the sysprep.inf. The file is properly deployed to the computer, but the sysprep isn’t prefilled with sysprep.inf, instad, som of the forms is filled with, for example %OrgName%, which isn’t definied in sysprep.inf.
Help!
How do i make sysprep listen to my sysprep.inf? When i sysprep the computer before creating image, i run sysprep /mini /reseal.
on Monday, January 18, 2010 at 3:06 pm K.o.R wrote:
Hello, thanks for the excellent guide – like many people here it seems, I still can’t get this to work properly – the GUI portion of Setup still completely ignores sysprep.inf, ristndrd.sif, etc.
Can you provide information on how to get NON-SYSPREP images to work (i.e. RIS copies of an XP CD)?
Any help is most appreciated!
on Thursday, January 21, 2010 at 11:55 am Ben wrote:
Hi,
I know this is an old page, but I am really hoping that I can get some kind of response from someone, as Google seems to be failing me.
Basically I am trying to edit the xp_unattend.xml so that it will create 2 hard disk partitions, a C: of 60gig and a D: using the rest of the space on the drive.
This is what the disk config section of my .xml file looks like:
OnError
1
Primary
true
60000
2
Logical
true
true
NTFS
WinXP
C
1
1
true
NTFS
Data
D
2
2
0
true
The problem I encounter is that this does not appear to actually do anything. I know that my xml file is being used, as it is automatically logging on to the domain for me, but the Hard Disk window still appears, and shows my entire drive as unallocated space.
If anyone can point me in the right direction, or see what I have done wrong, I would very much appreciate your feedback.
Thanks,
-Ben