Can't delete Win10 provisioning image folder

Alexander Erne 21 Reputation points
2020-07-30T07:40:31.227+00:00

Hello everyone,

i recently played around with creating a Windows 10 deployment image using a third party tool. Converting .esd to .wim copying source files around etc.
The tool ran into some compatibility issues with my system settings so I discarded my attempt at using this specific tool and tried some other tools.
Unfortunatly I created a folder on my desktop with all files from the windows .iso and the .wim files and so on. So this folder now inherits around 17.5GB of disk space and is living on my Desktop.
When I try to delete the folder it won't let me. I've killed every possible process, started windows in save mode, tried deleting it from an external boot device, with the domain admin account, nothing works.
I'm enlisted as owner of the folder and have full access to the folder. But when trying to delete it, it first said I need permission from myself to delete the folder.
I went and reapplied the ownership to myself (note: it was already set before). Now it starts to delete files, but occasionally throws errors that certain fildes can't be deleted. After about 2 minutes or so the deletion crashes and no files were actually deleted.
Trying to delete it with cmd-admin and rd /q /s MYFOLDER throws "access denied" messages immediately

14476-grafik.png

Is there ANY way I can get rid of this folder without completely wiping my SSD?
Are the windows install files somehow still mounted somewhere and is it possible to unmount those?

I am thankful for every bit of information. I couldn't find anything useful on the web that could be applied to my case.
Cheers

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,108 questions
0 comments No comments
{count} votes

Accepted answer
  1. Don Cuthbert 411 Reputation points
    2020-07-31T04:15:32.937+00:00

    My usual method for this is to boot from USB install media. However, from the first screen of Windows setup, use SHIFT-F10 to get a Command Prompt that should have full rights.

    Now try your rd /S /Q [PATH to folder name]

    Once you restart Windows normally, if your system still has reference to the now deleted folder that was mounted, you can use a DISM command to resolve that.

    DISM /Cleanup-Wim
    
    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Joy Qiao 4,886 Reputation points Microsoft Employee
    2020-07-31T02:18:43.517+00:00

    Hi,

    We do not recommend to use third party software to create system image, Microsoft Sysprep would be helpful for you to create system image which used on deploy image to computer.

    For deleting this folder issue, did you uninstalled the third party software? If not, try to uninstall it at first.
    Disable antivirus software especially third party antivirus software.

    Is it available to delete other files on same drive?

    As I noticed you could delete some file but persists with "access deny" error message, so please run the following command line to take own and check the issue again.

    takeown /f file_name
    icacls file_name /grant username_or_usergroup:F /q

    If the issue persists, please right click the folder, and choose properties\Security\Advanced, make sure you are owner of this folder.
    Or you could create a capture and paste it here.

    As some registry key missing will cause access deny error, we could use Procmon tool to monitor deleting process, then analysis the Promon thread to check for more details.

    Bests,

    1 person found this answer helpful.