How To: Cleanup WIM Images Before Upgrading/Patching Core

Version 4

    Verified Product Versions

    LANDESK Management Suite 9.6LANDESK Management Suite 2016.x

    Purpose

     

    This article covers how to check for existing mounted WIM files. When applying Service Packs, Component Patches, or Upgrading versions, mounted *.wim files can cause OSD.Upgrade.exe to fail.

     

    Related: https://community.landesk.com/support/docs/DOC-24702

     

    Check for Mounted WIM files

     

    • Open a CMD window as Administrator
    • Run the following command to find all mounted WIM files

    dism /get-MountedWiminfo

     

     

     

    Were any Mounted WIM files found?

    No mounted images found

     

    • If  the results indicate 'No mounted images found.' proceed to Cleanup WIM

    2-no mounted wims.png

     

    Yes, mounted images were found

     

    • If any mounted images are found, the image file and the mounted directory will be listed.
    • These mounted wims must be unmounted before an upgrade can take place. Continue to Unmounting WIM files.

    1-wim currently mounted.png

     

     

    Unmount WIM Files

     

    If a mounted images were found, they will need unmounted before an upgrade can be ran.

    There are 2 options at this point, Commit the changes to the mounted WIM, or Discard the changes to the mounted WIM.

    • Commit - Saves changes to a mounted WIM image
    • Discard - Do not save changes to the WIM image

     

    Decide which option is right for you, and progress to the corresponding section.

     

    Commit the Changes

     

    • Open a CMD window as Administrator
    • Use the Mount Directory we previously found in the following command:

     

    Dism /Commit-Image /MountDir:"mount directory"


    Example - In our sample image above, we found the Mount directory as C:\tempWinPE\MountBoot_x64, so the command would be - Dism /Commit-Image /MountDir:"C:\tempWinPE\MountBoot_x64"

     

     

    3-commit.png

     

    If you receive an error, please check this document: Error when unmounting WIMS

    Discard the Changes

     

    • Open a CMD window as Administrator
    • Use the Mount Directory we previously found in the following command:

    Dism /Unmount-wim /MountDir:"mount directory" /discard


    Example - In our sample image above, we found the Mount directory as C:\tempWinPE\MountBoot_x64, so the command would be - Dism /Unmount-wim /MountDir:"C:\tempWinPE\MountBoot_x64" /discard

     

    4-discard.png

     

     

    Cleanup WIM

     

    At this point there should be no remaining mounted wim files. Though it is not required

    to Cleanup the WIM connections after every time a WIM image is mounted/unmounted, we want to do it as our last step here as a precautionary measure.

     

    • Open a CMD window as Administrator
    • Run the following command to cleanup WIM connections

    Dism /cleanup-Wim

     

    With all WIM's unmounted, and the connections having been 'cleaned up', you should be prepared to continue with the other required pre-req checks for upgrading/patching etc.