Published at the request of a good man fcserg , so I ask karma to forward itMany of us often have tasks like “deploy many workstations”, and the hardware at all these stations may be different. Moreover, on some of these machines various software should be pre-installed (from “corporate sets” - ICQ, browsers, pdf readers, to “university” sets - Visual Studio, Project Manager). Previously, RIS (Remote Installation Services) was used for such purposes, now Microsoft is campaigning for WDS (Windows Deployment Services). We will focus on the latter.
WDS works fine with the images of Microsoft's new systems - Vista, Windows Server 2008, Windows 7, but what if we need to use the good old Windows XP (this is exactly what happens very often, because many have not yet switched to new systems) . In this article we will learn how to prepare the OS to create an image in the .WIM format with which the WDS server works.
First step: Create a template installation of Windows XP SP3
On a virtual machine, install WinXP SP3. I personally used VMWare as a virtual machine platform.
')
Also at this stage it makes sense to put all the software you need. I included in my standard package:
- Winrar
- K-Lite Codec Pack
- Microsoft Office
- Adobe Reader
- Total commander
- IM client (for example, QIP, ICQ ...)
- Browsers (eg Opera, Firefox)
For those who serve computer classes (universities, schools, gaming clubs), at this stage there is an opportunity to put additional software: development tools, graphic editors, etc.
The second stage: We prepare the system for removing the image, including packing it with all the necessary drivers.
Now the resulting virtual OS needs to be processed by Sysprep for correct post-installation. Just in case, let me remind you that Sysprep can be found on any installation disk with Windows XP (D: \ Support \ Tools \ deploy.cab), where D: is the letter of the CD drive in your virtual machine.
Unpack the contents of deploy.cab, for example, in C: \ Sysprep on a virtual machine and run setupmgr.exe. We are going through the process of creating an answer file in accordance with our needs. The only thing I will remind is that in choosing the type of answer file you need to select the second option - “Install Sysprep”.

As a result, we get the answer file Sysprep.inf. Now you need to slightly change the contents of this file.
In the [Unattended] section, change the parameter
InstallFilesPath = "C: \ WINDOWS \ Driver Cache \ i386"and add:
DriverSigningPolicy = Ignore
UpdateInstalledDrivers = YesIn the [SetupMgr] section, change the parameter
DistFolder = "C: \ WINDOWS \ Driver Cache \ i386"
Now you need to create a selection of drivers (these are the drivers that will be used to install all the devices in the system when the image is deployed). It can be made up of drivers that are used to install workstations in your company, or use one that is already ready (there are probably plenty of them on the Internet). We copy all these drivers in C: \ Windows \ Driver Cache of the virtual machine.
The next step is we need Sysprep Driver Scanner. Download it and place it in the C: \ Sysprep folder. We start and go through the following stages:
- Change the path to search for drivers on C: \ Windows \ Driver Cache.
- Click "Scan".
- Click "Default".
- Click "Save".
- Click "Done".

Now that the mini-installation of Sysprep is done, it will look for the driver in the directory we specified.
Again, you need to make changes to the Sysprep.inf file - add
[SysprepMassStorage] at the end of the file
. And we execute from the command line “sysprep.exe –bmsd”. At the output, we get something like:
[SysprepMassStorage]
pci \ ven_1022 & dev_7007 = c: \ windows \ inf \ machine.inf
pci \ ven_1022 & dev_700d = c: \ windows \ inf \ machine.inf
pci \ ven_1022 & dev_700f = c: \ windows \ inf \ machine.inf
pci \ ven_1022 & dev_740b = c: \ windows \ inf \ machine.inf
pcmcia \ ibm-pcmcia_portable_cd-rom_drive-84e3 = c: \ windows \ inf \ pnpscsi.inf
pcmcia \ ibm-pcmcia_cd-rom_drive_cd-400-5afa = c: \ windows \ inf \ pnpscsi.inf
pcmcia \ ibm-pcmcia_portable_cd-rom_drive-84e2 = c: \ windows \ inf \ pnpscsi.inf
pcmcia \ pcmcia-ide_card-3220 = c: \ windows \ inf \ pnpscsi.inf
...
![[SysprepMassStorage]](http://xmages.net/out.php/i573388_screen04.jpg)
These are driver IDs and their location.
Now we proceed to change the computer's kernel settings for our image. For this we need another utility - MySysprep. Download and unpack to the same Sysprep folder on drive C: our virtual machine. We search in the unpacked MySysprep.inf and remove all comment characters (;) from the [CPU] section. The edited file is saved. Now you need to change the default "Single-processor computer with ACPI" to "Computer ACPI". To do this, open the "Device Manager" and select the option to update the driver for the device "Single-processor computer ACPI". We refuse to look for offers and say that we will find everything ourselves, and already in the last window (the window of driver selection manually) we select “ACPI Computer”.

After this, we restart and run the mysysprep.exe file from the C: \ Sysprep folder. In the program window put a tick "mini-installation" and press the button "Reseal" ("Seal the computer").
Now our OS is ready to “capture” and create an image using WDS.

When you start the virtual machine, we go into the BIOS, set the network boot (PXE). When downloading via PXE, we get to the menu for selecting an image of a WDS server and select the image that we use on the WDS server to “capture”. After executing the bootloader, we select the image storage location (WDS server or local disk), and, in fact, the image creation process itself takes place.

The resulting image will automatically deploy Windows XP on the specified machine, with all devices installed with the correct drivers. It is also good because it is “not afraid” of assorted hardware configurations.

All of the above actions are relevant to the infrastructure with a deployed and configured WDS server. Also in the complex for creating Light-Touch Deployment images you can talk about the possibilities of creating an answer file for WDS server images, which allows you to simplify the deployment of an image and at all up to 1-2 keystrokes (automatic hard disk partitioning, auto image selection on WDS). server and much more). If you do not have such an infrastructure, then its creation could be the topic of the next article, although it turns out in this case is not very correct in terms of chronology.