Wix installer - Unable to delete Installation directory after uninstallation

31 Views Asked by At

My installation directory contains multiple folders and files. The folders are with admin privileges. I am able to cleanup everything in Installation directory but installation directory itself remains.

Tried RemoveFolder and RemoveFolderEx utility but could not succeed.

1

There are 1 best solutions below

0
Swapnil hajare On BEST ANSWER

After so many attempts finally moved to c++ custom action where I have more control over files.

Solution: Even after DeleteServices the service executable take time to exit. That was holding the log files. So I put while loop with 1 second sleep and kept checking the log files for deletion. After deleting those log files, also deleted the folder from same custom action.