Folder not removed after reboot when files are in use?

Question

When I uninstall with our application running, the folder that contained the app is not removed after reboot. Now I know the documentation for the RemoveFolders action says that if the folder is not empty it won’t remove the folder. However after the reboot, the folder is empty, shouldn’t it be scheduled for deletion after reboot as well?

Answer

There is a known issue when a folder held in use (that is empty) and not deleted during uninstall.

Content credit also belongs to

[Author: Robert Flaming]

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at https://www.microsoft.com/info/cpyright.htm.