Add an update package to Windows RE

You can apply an update to a Windows RE image. The steps to update a Windows RE image are different depending on whether you're updating an offline image, or an image on a running system.

Update an offline image

The steps below cover how to add an updated package to an offline Windows RE image.

Mount your Windows image

The Windows RE image (winre.wim) is included inside the Windows image (install.wim) and is eventually copied to the Windows RE tools partition on the destination PC or device. To modify the WinRE image, you have to first mount the Windows image, then mount the Windows RE image. After both images are mounted, you can make your changes, unmount the WinRE image, then unmount the Windows image.

  • Create a mount directory and mount install.wim:

    md C:\mount\windows
    Dism /Mount-Wim /WimFile:C:\images\install.wim /index:1 /MountDir:C:\mount\windows 
    

Mount your WinRE image

  • Mount the Windows RE Image file from your mounted image.

    Md c:\mount\winre 
    Dism /Mount-Wim /WimFile:C:\mount\windows\Windows\System32\Recovery\winre.wim /index:1 /MountDir:C:\mount\winre 
    

    Tip

    If winre.wim cannot be seen under the specified directory, use the following command to set the file visible:

    attrib -h -a -s C:\mount\windows\Windows\System32\Recovery\winre.wim
    

Add Update package to WinRE

With your recovery image mounted, you can add the update to fix the issue.

  1. Download the required update package and add it to your recovery image.

    Dism /Add-Package /Image:C:\mount\winre /PackagePath:"c:\downloadedupdate\update.msu" 
    
  2. Clean up your recovery image and reset the base of any superseded components:

    dism /image:C:\mount /cleanup-image /StartComponentCleanup /ResetBase 
    

Unmount your images

  1. Close all applications that might be accessing files from the image, including File Explorer.

  2. Commit the changes and unmount the Windows RE image:

    Dism /Unmount-Image /MountDir:"C:\mount\winre" /Commit 
    

    This process can take a few minutes.

  3. Commit the changes and unmount the Windows image:

    Dism /Unmount-Image /MountDir:"C:\mount\windows" /Commit 
    

    Where C is the drive letter of the drive that contains the image. This process may take several minutes.

The Windows RE image is now updated and part of the larger Windows image.

Apply the update to a running PC

You can apply the fix to the Windows Recovery image on a running PC. The following steps walk you through mouning a Windows Recovery image, applying an update to it, and then saving the changes:

  1. Open a Command Prompt as administrator.

  2. Create a directory where you can mount the recovery image to make changes to it.

    md c:\mount 
    
  3. Mount your recovery image with REAgentC:

    ReAgentC.exe /mountre /path c:\mount 
    
  4. With your recovery image mounted, you can download and add the update package to the Windows RE image.

    Dism /Add-Package /Image:C:\mount\ /PackagePath:"c:\downloadedupdate\update.msu" 
    
  5. Clean up your recovery image and reset the base of any superseded components:

    dism /image:C:\mount /cleanup-image /StartComponentCleanup /ResetBase 
    
  6. Unmount the Windows recovery image:

    ReAgentC.exe /unmountre /path c:\mount /commit 
    

The Windows RE image on the running PC is now updated.