The Windows Deployment Services client is an application that runs within Microsoft Windows Preinstallation Environment (Windows PE),enabling you to select and install an install image from a Windows Deployment Services server. This application is, in fact, Setup.exe from Windows Vista running in Windows Deployment Services mode.
- How the Client Applies
- How the Client Deals with
- When Setup Is Started in
Windows Deployment Services Mode
How the Client Applies Install Images
When you perform a Pre-Boot Execution Environment (PXE) boot on a computer and select a boot image, the Windows Deployment Services client performs the following actions:
- Determines that Setup should start in Windows Deployment
- Starts Windows PE networking (if it is not already
- Discovers a Windows Deployment Services server (this may be
from the PXE registry key or by using a discover image).
- Establishes an unsecured session to the Windows Deployment
- Determines the Windows Deployment Services client logging level
(if specified) and starts the logging process.
- Checks to determine whether there is an unattend file for the
Windows Deployment Services client.
- Proceeds through the Windows Deployment Services client UI
screens (UI language selection, keyboard layout, and
- Establishes a secure session to Windows Deployment Services
server by using the user's credentials.
- Receives a list of images from the server and displays it to
- Receives a list of external language packs (for images for
Windows Vista and Windows Server 2008).
- Proceeds through the Windows Deployment Services client UI
screens (image selection, disk configuration, and progress).
- Applies the image. When performing multicast deployments, the
image is copied and then applied. However, when using unicast
functionality, the image is applied over the network and is not
copied to the client computer. All data is sent in compressed
blocks of data. When these data blocks are received, the data is
expanded and written to the disk.
- Services the offline image (for example injects drivers).
- Sets boot parameters (for example, the Boot Configuration Data
(BCD) display language).
- Copies the $OEM$ folder (if it exists) for the image.
- Applies a language pack (if necessary).
- Retrieves the value of unattend variables (for example,
timezone) from the server.
- Checks for a per-image unattend file and copies it (if it
- Checks domain join settings in the unattend file (for example,
whether or not to join the domain, what computer name to use, what
domain to join, what credentials to use, and so on).
- Creates an account in Active Directory Domain Services
(AD DS) for the computer, if necessary. If an account already
exists, the client resets the account.
- Performs variable replacement on the unattend file (including
time zone, domain join settings, and so on).
- Restarts the computer.
How the Client Deals with Discover Images
When you perform a PXE boot on a computer and select a discover image, the Windows Deployment Services client performs the following actions:
- The client downloads the boot image from the server and the
image boots. At boot time, Setup.exe is invoked and it parses any
command-line options that were passed to it. Setup sees that it is
in Windows Deployment Services discovery mode and connects to the
specified server to download the install image.
- Setup.exe (Autorun) is launched automatically by Windows PE
(through the commands specified in WinPEshl.ini).
- Setup.exe (Autorun) parses the command lines passed to it (at a
minimum, setup.exe /WDS /WDSDiscover, and optionally,
setup.exe /WDS /WDSDiscover /WDSServer:MyWDSServer). Setup
realizes that it should be in Windows Deployment Services mode.
Autorun continues to run in the background (never showing UI) and
invokes regular Setup.exe with the command-line arguments as they
are passed in.
- Setup.exe detects that it is in Windows Deployment Services
discovery mode. One of the following occurs:
- If a server name was specified using the
/WDSServer option, the Windows Deployment Services client
contacts that server directly. (Skip to step 7.)
- If /WDSServer was not specified, the
client will initiate a PXE request by broadcasting a Dynamic Host
Control Protocol (DHCP) discover packet with the PXE option (option
tag 60 set to the string PXEClient) to destination port UDP 67. The
client waits for a response from a valid PXE server. The emulated
PXE request sent by the Windows Deployment Services client adheres
to the standards specified by the PXE specification (including
using the specified response delay settings).
- If a server name was specified using the /WDSServer option, the Windows Deployment Services client contacts that server directly. (Skip to step 7.)
- When a valid Windows Deployment Services server is located, the
client sends a DHCP request packet to UDP port 4011 of the
responding PXE server (in the case of static mode, the client sends
the packet to the server specified with /WDSServer). The
client expects a valid response (DHCP acknowledgment signal, or
ACK) from the PXE server.
- The client connects to the Windows Deployment Services server
by using the specified communication channel, and the normal
installation steps continue.
When Setup Is Started in Windows Deployment Services Mode
Setup.exe in Windows Vista is composed of many modules. When Setup.exe is started, it loads the appropriate modules. The Windows Deployment Services client (implemented as WDSclient.dll) is one of these modules. There are two ways to start Setup.exe in Windows Deployment Services mode:
The default method and most common way to invoke the Windows Deployment Services client is for Setup.exe to detect automatically that it should start in this mode. This method is used when you use the Boot.wim from the Windows Vista media (in the \Sources folder).
The Boot.wim file contains its own \Sources folder that includes the Setup.exe file and associated files. At boot time, Windows PE must start a shell application. You can explicitly define this application by using entries in the WinPESHL.ini file, or it can be implicitly discovered through code in Windows PE. In the latter case, Windows PE looks for Setup.exe in the \Sources folder and, if the program is present there, Windows PE automatically starts the application. This happens if the WinPESHL.ini file does not exist or if it contains an empty [LaunchApp] section.
When Setup.exe is running, two additional checks are automatically performed to determine whether Setup should start in Windows Deployment Services mode. If the answer to either or both of the following questions is No, Setup will not start in Windows Deployment Services mode.
Was Windows PE started by using PXE boot?
When a computer running Windows Vista PXE boots, a response packet containing boot server information (such as the IP address and name of the network boot server) is inserted into the registry of the boot image at HKLM\System\CurrentControlSet\Control\PXE. This information is preserved throughout the boot process because it is passed from the loader to the kernel in the loader message block (it is inserted into the registry by the kernel).
Setup.exe looks at the data in the BootServerReply value of HKLM\System\CurrentControlSet\Control\PXE. This value controls the following two aspects of starting Windows PE:
Is Setup.exe running from the Windows system drive?
Before starting in Windows Deployment Services mode, the next check is to locate where Setup.exe is running.
Manually Invoking Setup.exe
It is possible to force Setup.exe to start in Windows Deployment Services mode. This is particularly valuable if you want to run Setup from a Windows PE instance that was not started by a PXE boot. You can force Setup.exe to start in this mode by specifying the /wds option on the command line when starting Setup (for example, \sources\setup.exe /wds). Note that you will receive an error if you use the /wds command outside of Windows PE.
Diagram of Startup Logic
The following diagram that illustrates the Windows Deployment Services client startup logic