OSD Toolkit
3.1.9.0
3.1.9.0
  • Start Here - OSD Toolkit 3.1.9.0
  • Introduction
    • Release Notes
    • Introducing 2Pint Software OSD Toolkit
    • The 2Pint Alternate Content Provider
      • Tracking progress and results
      • OSD ACP Turbo feature
      • OSD Toolkit & well connected sites
  • Customization
    • Adding BranchCache to WinPE
    • Customizing a Task Sequence to Support BranchCache
  • Operations
    • Deploying Computers with BranchCache
    • Pre-Caching OSD Content
  • Appendix
    • 2Pint OSD Toolkit Task Sequence Module Details
      • Module- 2Pint Software OSD Toolkit Phase 1
      • Module- 2Pint Software OSD Toolkit Phase 2
      • Module- 2Pint Software OSD Toolkit Phase 3
    • BCEnabler Technical Reference
    • Troubleshooting
    • Logging
Powered by GitBook
On this page
  • Prerequisites
  • Using the WinPE Generator Utility
  • WinPE Generator (WinPEGen.exe) Command Line Parameters
  • Mandatory Parameters
  • Optional Parameters
  • Adding the BranchCache enabled Boot Image into Configuration Manager
  • Adding .NET Components to WinPE
  • Option to Disable Mandatory Task Sequence Warning Countdown Dialog
Export as PDF
  1. Customization

Adding BranchCache to WinPE

PreviousOSD Toolkit & well connected sitesNextCustomizing a Task Sequence to Support BranchCache

Last updated 6 months ago

Before you can use BranchCache in WinPE you need to generate a WinPE image that contains the services and binaries to enable this magic.

Note: If changing or updating the boot image is a major blocker, please contact us.

Generating a new WinPE Boot Image is done via a command line utility (WinPEGen.exe). This utility requires you to have administrator rights on the machine where you run the tool. The reason for this is that it mounts registry hives from the offline media, a privilege that requires administrative rights. In a locked down environment this can be run on a standalone non domain joined computer.

The WinPE images created can then be used as regular boot images in Configuration Manager or MDT (with Configuration Manager). This makes no difference to these processes, they simply have the inbuilt BranchCache & BITS functionality available if called upon.

Prerequisites

Prior to executing the WinPE Generator tool, consider the below prerequisites:

  • WinPEGen.exe should be run on a workstation or server with Windows 10 / 2019 or higher (x86 or x64). The generator does not need to install anything and stores/mounts temporary files in the %temp% folder of the user running the process.

  • The User must be a member of the Local Administrators group. Administrative access is required in order to mount the registry hives in the source and boot media. This is a privileged operation which requires Administrative access to the machine.

  • A WinPE image (boot.wim) that has not been finalized (i.e. still allows changes to be made to it). This can be acquired either from the Configuration Manager server or the Windows ADK directly.

  • The Windows installation source media (install.wim) of either Enterprise or Professional editions.

Note: Although the media does not have to be Enterprise, Professional requires BITS added in order to provide BranchCache functionality. Enterprise media adds native HTTP support for BranchCache.

Using the WinPE Generator Utility

The WinPE Generator tool (WinPEGen.exe) is used to create a BranchCache enabled WinPE image.

WinPE Generator (WinPEGen.exe) Command Line Parameters

Note: The boot.wim file referenced in this process will be modified. It is best practice to make a backup or copy of the original boot Wim.

Mandatory Parameters

The syntax of the WinPE Generator command line parameters is below:

WinPEGen.exe "Source.wim" Index "Boot.wim" Index [Options]

Example:
WinPEGen.exe "c:\temp\install.wim" 1 "c:\temp\boot.wim" 1 

The generator has the following mandatory configuration parameters:

Parameter
Description

Source.wim

The full path and name of the Windows installation source WIM file (install.wim).

Index (source.wim)

The index number of the source.wim to use - Professional or Enterprise.

Boot.wim

The full path and name of an existing WinPE boot WIM file.

Index (boot.wim)

The index number of the WinPE Boot.wim to use.

Optional Parameters

Below is an example of the optional command line parameters:

Example:
WinPEGen.exe C:\Temp\install.wim 1 c:\temp\boot.wim 1 /Add-StifleR /StifleRSource:"C:\Temp\StifleR Client" /StifleRConfig:"C:\temp\StifleR Client\StifleR.ClientApp.exe.Config"

To include the StifleR Client components in the WinPE image:

Parameter
Description

/Add-StifleR

/StifleRSource:<path>

Full path to StifleR Client program files from a full Windows StifleR client installation.

/StifleRConfig:<path>

Full path to the StifleR Client configuration file (StifleR.ClientApp.exe.Config).

/Add-StifleROnly

Adds only the StifleR client and does not add BranchCache and BITS to the image.

/Remove-BITS

Removes BITS for Bandwidth Policy Aware Downloads in WinPE. Note: The Windows Source.wim must be Enterprise edition if using /Remove-BITS option, otherwise data transfers will not be BranchCache enabled.

/Copy-BITSPolicy

Copies the local BITS policy into the WinPE Image. This overwrites the default BITS policy which is limited to 1Mb/s during business hours of Monday-Friday 08:00-17:00 and 2Mb/s during any other time. Ignoring speed limits on the LAN allows full throttle download for cached local content. Use GPEdit to create a local BITS policy which can then be copied automatically at build time.

Adding the BranchCache enabled Boot Image into Configuration Manager

Once the new boot image is created, copy it to your Configuration Manage package share. In the Configuration Manager Console, under the Software Library workspace, expand the Operating Systems folder. Right-click the Boot Images, and in the context menu, select Add Boot Image. Follow the "Add Boot Image Wizard" to add the boot image into Configuration Manager.

Once complete, remember to modify your Task Sequences to use the new boot image.

Adding .NET Components to WinPE

If you include the StifleR Client to your WinPE image, you will need to add Microsoft .NET Components to the WinPE Image. This can be done after importing the WIM file into Configuration Manager by opening the Properties of the boot image, selecting the Optional Components tab, and clicking the starburst icon.

At the "Select optional components" pop-up, select the component: Microsoft .NET (WinPE-NetFx) and click OK. Click OK to commit the change to the boot image properties. Follow the prompts to update the boot image and redistribute it to your Distribution Points.

Option to Disable Mandatory Task Sequence Warning Countdown Dialog

Note: This section only applies if you used the /Add-StifleR and /StifleRConfig:<path> options with WinPEGen.exe.

When a mandatory task sequence deployment is targeted to a PXE or Media booting client, prior to the task sequence starting, a "Mandatory Task Sequence Warning" countdown dialog is displayed to the user before the task sequence deployment starts.

This dialog box can be suppressed / skipped by modifying the StifleR.ClientApp.exe.Config file that is specified in the /StifleRConfig:<path> parameter for WinPEGen.exe.

Under the <appSettings> section in the StifleR.ClientApp.exe.Config file, add the following line:

<add key="SkipMandatoryWarning" value="1" />

After saving the file, when you run WinPEGen.exe, the boot image will include the file and if present, the Mandatory Task Sequence Warning dialog will be suppressed.

If the boot image has already can be created, and the StifleR Client has included in the boot image, you can edit the .config file after the fact by mounting the boot image, and editing the .config file under: <MountDirectory>\Program Files\2Pint Software\StifleR Client\StifleR.ClientApp.exe.Config

Access to the 2Pint Software "WinPEGen.exe". This is freely downloadable from the website as a part of the .

Important: The Windows installation source.wim MUST be the same release version, i.e. same build, as the Boot WIM that is to be modified. If you have a patched install.wim you need to patch your WinPE image. A script to do this can be found here: . Also you have a KB describing how its done:

Adds the StifleR client to the WinPE image under the %WINDIR%\System32\ path. If using this option, it is important to add Microsoft .NET Framework support to the boot image in Configuration Manager. See for how to do this.

OSD Toolkit
OSD Toolkit Downloads
https://kb.2pintsoftware.com/help/generating-the-winpe-boot-image
below
Shows WinPE images that have been enabled with BranchCache imported into Configuration Manager, ready for use.