> For the complete documentation index, see [llms.txt](https://documentation.2pintsoftware.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.2pintsoftware.com/deployr/getting-started/generate-windows-pe-boot-images/patching-winpe-media.md).

# Patching WinPE Media

To patch your x64 boot media, DeployR will automatically do this if you've downloaded the CUs and placed them into the correct folder.

Assuming DeployR is installed to the default the location, it will look here for the updates:

C:\Program Files\2Pint Software\DeployR\WebServer\Scripts\\%ARCH%\updates

Ex for x64 C:\Program Files\2Pint Software\DeployR\WebServer\Scripts\amd64\updates

Based on the ADK installed, as example 24H2 (26100) ADK, download the corresponding CU files from the Microsoft Update Catalog, in this example, you'll grab the latest CU from the normal patch cycle.

<figure><img src="/files/Qa2igCMrbSHW8hIgYKxx" alt=""><figcaption></figcaption></figure>

Click on Download, a new box will open, if more than one file is listed, download them all:

<figure><img src="/files/SyiBSCUMIQUQwrdhz9Pn" alt=""><figcaption></figcaption></figure>

With both of them downloaded, make sure they are unblocked in the properties, then move them into the correct location:

<figure><img src="/files/CH8NKW7ytl4nEq1GvQAV" alt=""><figcaption></figcaption></figure>

Then regenerate the media via the button in the dashboard.  When following along in the log, you'll see first an error trying to apply the first update (kb5095093), this is expected.  It will then successfully apply the main CU, patching the media.

<figure><img src="/files/0oOWoKPbcTIaOfzBiFso" alt=""><figcaption></figcaption></figure>

To confirm patch level, use Get-WindowsImage function, grabbing the index 1 for the winpe\_amd64.wim in the content\boot directory.

<figure><img src="/files/6TWtmdfUCiS6KkFMsb79" alt=""><figcaption></figcaption></figure>

Then the next time a device is booted with that media, it will also show the value in the WINPEBUILDINFO varaible:<br>

<figure><img src="/files/adeEdf6mKPSzjdaxFW4b" alt=""><figcaption></figcaption></figure>

### Why Patch WinPE?

Typically this is unneeded, but sometimes Microsoft has a bug or an issue in the default ADK that requires a patch.  The other reason is to support an updated Secure Version Number (SVN) in the firmware.  For addtional details: <https://support.microsoft.com/en-us/topic/enterprise-deployment-guidance-for-cve-2023-24932-88b8f034-20b7-4a45-80cb-c6049b0f9967> and check out  Mitigation 4: Apply the Secure Version Number​​​​​​​ update to the firmware.  Additional information from the community concerning the SVN: <https://www.deploymentresearch.com/creating-uefi-2023-compliant-winpe-iso-files/>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://documentation.2pintsoftware.com/deployr/getting-started/generate-windows-pe-boot-images/patching-winpe-media.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
