Export (0) Print
Expand All
35 out of 36 rated this helpful - Rate this topic

How the Windows Deployment Services Client Works

Updated: May 8, 2008

Applies To: Windows Server 2008

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.

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:

  1. Determines that Setup should start in Windows Deployment Services mode.

  2. Starts Windows PE networking (if it is not already started).

  3. Discovers a Windows Deployment Services server (this may be from the PXE registry key or by using a discover image).

  4. Establishes an unsecured session to the Windows Deployment Services server.

  5. Determines the Windows Deployment Services client logging level (if specified) and starts the logging process.

  6. Checks to determine whether there is an unattend file for the Windows Deployment Services client.

  7. Proceeds through the Windows Deployment Services client UI screens (UI language selection, keyboard layout, and credentials).

  8. Establishes a secure session to Windows Deployment Services server by using the user's credentials.

  9. Receives a list of images from the server and displays it to the user.

  10. Receives a list of external language packs (for images for Windows Vista and Windows Server 2008).

  11. Proceeds through the Windows Deployment Services client UI screens (image selection, disk configuration, and progress).

  12. 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.

  13. Services the offline image (for example injects drivers).

  14. Sets boot parameters (for example, the Boot Configuration Data (BCD) display language).

  15. Copies the $OEM$ folder (if it exists) for the image.

  16. Applies a language pack (if necessary).

  17. Retrieves the value of unattend variables (for example, timezone) from the server.

  18. Checks for a per-image unattend file and copies it (if it exists).

  19. 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).

  20. 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.

  21. Performs variable replacement on the unattend file (including time zone, domain join settings, and so on).

  22. Restarts the computer.

When you perform a PXE boot on a computer and select a discover image, the Windows Deployment Services client performs the following actions:

  1. 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.

  2. Setup.exe (Autorun) is launched automatically by Windows PE (through the commands specified in WinPEshl.ini).

  3. 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.

  4. 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).

  5. 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.

  6. The client connects to the Windows Deployment Services server by using the specified communication channel, and the normal installation steps continue.

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.

 

Check Explanation

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:

  • The fact that the key exists is an indicator that the Windows PE instance was booted from the network. If the Windows PE instance was not booted, meaning that the computer was booted from some other media (such as a DVD, CD, USB key, or hard disk drive), you must manually invoke the Windows Deployment Services mode of Setup.

  • The packet contains the IP address of the PXE server that the boot image was downloaded from. The Windows Deployment Services client uses this information to determine which Windows Deployment Services server to contact.

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.

  • If Setup.exe is running from the same location as the system drive of Windows PE (for example, X:), Setup will start in Windows Deployment Services mode.

  • If Setup.exe is running from a location other than the system drive, Setup will start in normal mode. This accounts for the case in which Windows PE is booted from a non-Microsoft PXE server and Setup.exe is started from a shared network folder. In this scenario, Windows Deployment Services is not present in the environment, and Setup.exe will therefore not start in Windows Deployment Services mode.

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.

The following diagram that illustrates the Windows Deployment Services client startup logic

Windows Deployment Services client startup logic.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.