Relgon
Posts: 1
Joined: Sun Oct 16, 2005 4:42 pm

Folder/file deletion on uninstall

Hello all,

I hope I'm not missing anything too obvious here.
On installation, my package makes a subfolder under TargetDir which holds some DLLs and a couple of EXEs. The application itself whilst running creates another subfolder and writes files to it as well as one file to TargetDir too.
My problem is that on uninstall TargetDir is not deleted. I guess this is because it still holds the file and subdirectory created by my application. The subfolder created by the installer is deleted just fine.
I have gotten around it by using a custom action on uninstall but I'm wondering if that is the best way of doing it or if there is a setting like "remove all folders created at install even if not empty" someplace I have missed.

Thanks in advance.
ciprian
Posts: 259
Joined: Thu Jul 14, 2005 12:56 pm
Location: Craiova, Romania
Contact: Website

Hi,

The TargetDir folder is not deleted because it still contains the file your application created. Upon uninstall Windows Installer removes only the files and folders created during the installation process.

As for that setting I'm afraid that it doesn't exist because Windows Installer doesn't support such a feature. The only way to remove the TargetDir folder is a custom action.

Best regards,
Ciprian
Ciprian Burca
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”