Applies ToWindows Server 2022

IMPORTANT This update will not be offered if your Windows Recovery Environment (WinRE) meets any of the following conditions:

  • If the WinRE recovery partition does not have sufficient free space, see the NOTE in the "Summary" section. The note provides instructions about how to increase the available free space in the WinRE recovery partition.

  • If the WinRE recovery partition was manually updated by using the procedure in Add an update package to Windows RE and is already up to date.

  • If the WinRE image has a version greater than or equal to version 10.0.20348.2201. To determine the version of your WinRE image, see the "Methods to verify the WinRE version installed" section.

  • If your running PC does not have a WinRE recovery partition. To verify if you have WinRE enabled, run the following command in an elevated command prompt: reagentc /info. If WinRE is enabled, you will see Windows RE status in the output with a value of Enabled. In this scenario, this update might be needed.

Change date

Change description

August 14, 2024

  • Updated the WinRE version to greater than or equal to version 10.0.20348.2201​​​​​​​.

August 13, 2024

  • Added the IMPORTANT note at the top of the article. This note combines the conditions under which this WinRE update is not needed and will not be offered.

  • Revised the NOTE in the "Summary" section about how to increase the WinRE recovery partition to 250 MB of free space.

  • Moved this content from update KB5034439 which has been retired.

  • Added content to point to the NOTE in the “Summary” section about how to increase the available free space in the WinRE recovery partition.

  • Updated the “Summary” section to remove unneeded information about the CVE.

Summary

This update automatically applies Safe OS Dynamic Update (KB5034235) to the Windows Recovery Environment (WinRE) on a running PC. The update installs improvements to Windows recovery features.

NOTE This update requires 250 MB of free space in the recovery partition to install successfully.

If you would like to make sure your device is offered this update, please follow the Instructions to manually resize your partition or use a sample script to increase the size of the WinRE recovery partition.

Once your partition has sufficient disk space, click Start > Settings > Windows Update > Check for updates to have the update offered to you and then install it.

How to get this update

This update is available through the following release channels.

Release Channel

Available

Windows Update

Yes

Microsoft Update Catalog

No

Windows Server Update Services (WSUS) and Microsoft Endpoint Configuration Manager

No

Prerequisites

The device must have 250 MB of free space in the recovery partition to be offered and apply this update.

Restart information

You do not need to restart your PC after applying this update.

Removal information

This update cannot be removed once it is applied to a Windows image.

Update replacement information

This update replaces the previously released update KB5034439.

Verify the installation of this update

After installing this update, the WinRE version installed on the device should be greater than or equal to version 10.0.20348.2201​​​​​​​.

To get the version of WinRE installed, run the following PowerShell script "GetWinReVersion.ps1" with Administrator credentials. After you run the script, you should receive the installed WinRE version as in the following example:

GetWinReVersion.ps1 PowerShell script

################################################################################################

#

# Copyright (c) Microsoft Corporation.

# Licensed under the MIT License.

#

# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,

# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER

# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,

# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE

# SOFTWARE.

#

################################################################################################
# Function to get WinRE path

function GetWinREPath {

    $WinRELocation = (reagentc /info | Select-String "Windows RE location")

    if ($WinRELocation) {

        return $WinRELocation.ToString().Split(':')[-1].Trim()

    } else {

        Write-Host "Failed to find WinRE path" -ForegroundColor Red

        exit 1

    }

}

 
# Creates and needs to be return the mount directory
function GetMountDir {
    # systemdirve\mnt
    $MountDir = "$env:SystemDrive\mnt"
    if (-not (Test-Path $MountDir)) {
        New-Item -ItemType Directory -Path $MountDir -Force | Out-Null
    }
    return $MountDir
}  

# Function to get WinRE version
function GetWinREVersion {

    $mountedPath = GetMountDir
    $filePath = "$mountedPath\Windows\System32\winpeshl.exe"

    $WinREVersion = (Get-Item $filePath).VersionInfo.FileVersionRaw.Revision

    return [int]$WinREVersion

}


# Main Execution

$WinREPath = GetWinREPath


# Make dir C:\mnt if not exists

$TempDir = GetMountDir


# Get the read write permission for this directory

if (-not (Test-Path $TempDir)) {

    New-Item -ItemType Directory -Path $TempDir -Force | Out-Null

}


# Mount WinRE image

dism /Mount-Image /ImageFile:"$WinREPath\winre.wim" /Index:1 /MountDir:"$TempDir"


$WinREVersion = GetWinREVersion

Write-Host "WinRE Version: $WinREVersion" -ForegroundColor Cyan

dism /Unmount-Image /MountDir:"$TempDir" /Discard

Remove-Item -Path $TempDir -Force -Recurse

References

Description of the standard terminology that is used to describe Microsoft software updates

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.