Page 1 of 1

Why doesn't installaware's uninstall not delete folders

Posted: Thu Feb 15, 2007 3:29 pm
by PShah
When I uninstall my product, all the files I installed get deleted, but the folders that the installer created for them do not. They get left as empty folders, even if nothing beyond the original install was added to them. Is this behavior configurable?

Thanks.

Posted: Fri Feb 16, 2007 7:49 am
by MichaelNesmith
These folders are automatically deleted - you can try with a generic project and see that this works.

I think in your case you may have another program still using these folders, thus maybe they are locked and not removed. Try seeing what happens after a reboot.

If you want to try to force a delete, try to use Delete Files Recursive, or Call DLL Function on RemoveDirectoryA in kernel32.dll.

deleting folders

Posted: Fri Feb 16, 2007 6:57 pm
by PShah
You mean I should explicitly use those commands in the MSI script? I'm not sure where exactly I need to put code for it to be executed on uninstall. I suppose I could just put inside an 'if REMOVE' block?

Posted: Sun Feb 18, 2007 4:13 pm
by MichaelNesmith
Yes, you can do that. Your situation is not typical, normally you do not need to do manual removal. But it might be easier for you to delete folders by brute force rather than identify the cause.