Luna - Technical Editor at Hasleo Technology
Written by Luna
Technical Editor at Hasleo Technology, focuses on data protection and practical solutions.
Updated on November 26, 2026 | Hasleo Backup Suite
💬 I have just updated Hasleo Backup Suite Pro. When I add a boot menu, the software displays an error message and cannot create the boot menu.

Short answer: The previous WinPE creation did not complete, and the old WIM image is still in use by the system, so the new image cannot be written or mounted, which triggers the error. This guide describes three solutions: restart the computer, use DISM to unmount the residual image, and use DISM to clean up the damaged mount.

Why Can't I Add a Boot Menu After the Update?

When Hasleo creates the WinPE boot environment, it uses the built-in Windows DISM (Deployment Image Servicing and Management) tool to mount the base WIM file to a temporary directory (usually C:\WinPETem\), and then injects drivers and program files into it. If this process is forcibly interrupted, the mounted image is not automatically unmounted and keeps the WIM file and the mount directory locked.

When you re-add the boot menu entry after updating the software, Hasleo needs to rebuild the WinPE image. However, the old image is still in the "mounted" state, so the new image cannot be written to the same location and the build fails with an error. In essence, a residual DISM mount session is blocking the new WinPE build process.

Preparation Before Repair

Before you begin, complete the following preparations to avoid interruptions during the operation:

  • Save and close any files you are editing. The following steps may require a computer restart.
  • Open Task Manager and close all Hasleo-related processes, such as BackupMainUI.exe, BackupService.exe, and BackupWorker.exe.
  • Make sure that you have administrator privileges. The following commands must be run from an administrator command prompt.
  • If third-party antivirus software is installed, temporarily disable real-time protection, and re-enable it after the operation is complete. (Some security software blocks writes to C:\WinPETem\.)

Method 1: Restart the Computer

This is the simplest method. In many cases, restarting the computer releases the occupied image and clears the temporary state.

1
Restart the computer normally (do not force a shutdown using Fast Startup).
2
After the restart is complete, open Hasleo Backup Suite Pro and click Tools > Add Boot Menu again.
Click Tools and Add Boot Menu in Hasleo Backup Suite 
3
If the operation completes successfully, the problem is solved. If the error persists, continue with Method 2.

Method 2: Check for and Unmount the Residual WinPE Image

This is the most direct and safest repair method. It applies when Method 1 does not work.

1
Click the Start menu, type cmd, right-click the result, and choose to open the Command Prompt as administrator. If a User Account Control prompt appears, click Yes.
Open Command Prompt as administrator 
2
In the Command Prompt, run the following command to view the currently mounted WIM images.
dism /get-mountedwiminfo
Run dism /get-mountedwiminfo to list mounted WIM images 
3
If the output contains no entries related to C:\WinPETem\, skip Method 2 and proceed directly to Method 3.
No mounted images found in the DISM output 

If the output contains an entry whose mount path includes C:\WinPETem\, that entry is the residual WinPE mounted image.

A residual WinPE mount path under C:\WinPETem 
4
Run the following command to unmount it.
dism /unmount-image /mountdir:"C:\WinPETem\636a3274-569a-4069-9974-21d04e3a88ce\mount" /discard
Run DISM to unmount the residual WinPE image 
⚠ In practice, replace C:\WinPETem\636a3274-569a-4069-9974-21d04e3a88ce\mount with the actual path found in Step 3.
5
If the command reports that the operation completed successfully, the image was unmounted successfully. If it reports Access is denied or The file is in use, make sure all Hasleo processes have been ended, and then try again.
DISM reports that the image was unmounted successfully 
6
Run the command from Step 2 again to confirm that the related C:\WinPETem\ entry has disappeared, and then open Hasleo Backup Suite and add the boot menu again. The operation should now complete normally. If adding the boot menu still fails, continue with Method 3.
Verify that the residual WinPE image is no longer mounted 

Method 3: Clean Up the Residual Mount State

/cleanup-wim is a dedicated repair parameter built into DISM. It deletes the mount resources associated with a damaged WIM image. When the unmount command in Method 2 fails, or when the C:\WinPETem\ directory is still locked but no valid entry remains in the DISM list, this solution can forcibly clean up the residual mount metadata and temporary files.

1
Click the Start menu, type cmd, right-click the result, and choose to open the Command Prompt as administrator. If a User Account Control prompt appears, click Yes.
Open Command Prompt as administrator 
2
In the Command Prompt, run the DISM cleanup command. This command scans each drive and attempts to clean up damaged mount associations.
dism /cleanup-wim
Run dism /cleanup-wim to clean up the residual mount state 
3
When the command completes, it should report that the operation completed successfully. Then exit the Command Prompt. We recommend restarting the computer. After that, open Hasleo Backup Suite, and you should be able to add the boot menu or create WinPE normally.
DISM reports that the residual mount was cleaned up successfully 

Preventive Measures

To prevent this problem from happening again, follow these recommendations:

  • Avoid interrupting the WinPE creation process: While Hasleo is creating the WinPE image, do not force-close the software or restart the computer. This process usually takes several minutes; please wait patiently for it to complete.
  • Remove the old boot menu before updating: Before installing a new version, we recommend clicking Remove Boot Menu in the Tools menu of the old version, then adding it again after the update. The installer removes the boot menu item during the upgrade, but residual temporary files can still cause issues.
  • Check the DISM mount status regularly: If you often perform system maintenance or use other tools that involve WIM files, you can occasionally run dism /get-mountedwiminfo to check for images that were not unmounted properly.
  • Configure antivirus exclusions: If the problem recurs, add BackupMainUI.exe, BackupService.exe, and BackupWorker.exe to the antivirus exclusion list to prevent writes from being blocked.

Frequently Asked Questions (FAQ)

Q: Will running /discard make me lose my backup data?

A: No. /discard only discards temporary changes made during the current WinPE image build process. It does not affect your existing backup files or backup task configurations.

Q: Will /Cleanup-Wim delete my WIM files?

A: No. /Cleanup-Wim cleans up corrupted mount associations and leftover resources recorded by DISM. It does not delete the original WIM files. Your Hasleo backup files and WinPE source files remain intact.

Q: Why do I need to re-add the boot menu after updating the software?

A: During the upgrade, Hasleo Backup Suite first uninstalls the old version, which removes the old boot menu entries. You therefore need to manually add them back after updating so that the boot menu points to the WinPE environment for the new version.

Q: Can I delete the C:\WinPETem\ folder entirely?

A: Yes. This folder is a temporary working directory created when Hasleo builds WinPE. It is normally cleaned up automatically after the process finishes. Deleting it manually will not affect the software or your existing backups.

Conclusion

This article addresses the typical problem of troubleshooting and fixing residual WinPE images and provides a three-level troubleshooting path, from simple to advanced:

  • Solution 1 (restart the computer): Zero cost and worth trying first. It applies when the temporary state can be cleaned up automatically by the system.
  • Solution 2 (use DISM to unmount the residual image): For ordinary residue that DISM can still identify as a mount session, use the standard /Unmount-Image /Discard unmount.
  • Solution 3 (use DISM to clean up the damaged mount): For edge cases where the mount state is damaged and standard unmounting fails, use /Cleanup-Wim to force cleanup and restart the computer.

These three solutions build on one another. After repairing the problem, take preventive measures to reduce the chance of it happening again at the source.