Symptoms
1. You installed Bootable Media Builder and appropriate Windows AIK/ADK for creating WinPE media.
2. WinPE media creation fails with the following error:
The user attempted to mount to a directory that is not empty. This is not supported.
Example of full error log: click to expand
Code: 1.572.897(0x00180021)
LineInfo: 0xA0A7FA0A4449FBC7; File: e:\528\builder\lib\winpe_builder.cpp;
Function: WinPEBuilder::ProceedWithWIM; Line: 1.820;
Module: media_builder_vsa64_14330
Message: Failed to mount the source WIM image.
Code: 65.520(0x0000FFF0)
LineInfo: 0x4676E1DB2164CE5F; File: e:\528\builder\lib\wim_api.cpp;
Function: WIMGAPIMounter::MountWIMImage; Line: 157;
Module: media_builder_vsa64_14330
Fields: code: 0xc1420114
Message: The user attempted to mount to a directory that is not empty. This is not supported.
Cause
Folder C:\Users\%username%\AppData\Local\Temp\~MntWIM that is used to store temporary mounted .wim image is not empty.
Solution
Delete or rename C:\Users\%username%\AppData\Local\Temp\~MntWIM folder, then reattempt WinPE media creation.