As seen below, smsts.log states that it fails to complete installation of the image, with the error: “Installation of Image x in package [Package ID] failed to complete. The directory is not empty. Error: 80070091; Source: Windows”.

Investigating the remaining files on the local drive gives us a clue that some files could not be deleted. The folder “Documents and Settings” was still visible on the local drive C after attempting to wipe the drive. A single file in the users documents called “SlideIT.exe “ was not deleted during the tasksequence step “Wiping volume C”.

Notice the whitespace (“ “) in the end of “SlideIT.exe “.

Note: As this deployment was a migration scenario using Hardlink, the drive is wiped (files deleted) and the disk not formatted completely.

If a single file is named with whitespace somewhere in the name, a regular delete command cannot delete the file and folders above hierarchy. Pending file operations or corrupted files could cause this error as well.

Solution:

Locate the undeleted files on the local drive while error message is still present

Reboot using a SCCM boot image (Bootable device or PXE) to enter WinPE

Quickly delete the issued files and folders before the error state occurs and before the file enter “in use state” using the following commands: