On a Windows 8 system, I had to kill Mustang PEBuilder 2 through the Task Manager due to it hanging while creating an ISO file. When I restarted it and clicked on Create WinPE ISO, I saw the error message below:
Folder C:\winpe_x86 exists. Move, rename or delete and try again. Program will terminate.
When I clicked on OK, the Mustang PEBuilder window
closed. The C:\winpe_x86
directory gets created during the
process by which Mustang PEBuilder 2 creates the .iso file. The directory
and its contents are normally deleted after the ISO file is created. When it
has not been deleted and I had previously seen the error message,
I was able to delete the C:\winpe_x86
folder and all
its contents and restart the process of building an ISO file without a
problem. But this time I received "access denied" messages when attempting
to delete some of the directories and files within it.
The problem was due to the directories and files being owned by TrustedInstaller. To remedy the problem, I took the following steps:
- Right-click on a directory that can't be deleted and choose Properties.
- Click on the Security tab.
- Click on the Advanced button.
- The owner will be listed as TrustedInstaller; click on
Change then in the "Enter the object name to select" field, type
Administrators
. - Click on OK.
- Click on the checkbox next to "Replace owner on subcontainers and objects" to check the box.
- Click on the Apply button.
- In the "Permission entries" list, make sure Administrators have "Full control".
- Check the checkbox for "Replace all child object permission entries with inheritable permission entries from this object. When notified that this will replace explicity defined permissions on all descendants of this object with inheritable permissions, click on Yes.
- Click on the Apply button.
- You can now close the "Advanced Security Settings" window by clicking on OK.
- You can click on OK again to close the Properties window for the directory.
You should now be able to delete the directory and all subdirectories and files within it.
References: