View Full Version : Empty Folder Removal

07-07-2008, 04:57 AM
Hi All

I am using IS Express so am quite limited here. My problem is that after uninstallation, empty folders are left on the user's machine. I include JRE 1.6 with my MSI, and that has a couple of empty folders to start with. I notice that after installation, REGEDIT shows these folders to have a data value of '1' in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\Folders\myinstalledfolder\. I've also used ORCA to see that the problematical folders are listed in CreateFolder table.

I have read plenty on the web about CreateFolder and RemoveFiles but i see no solution in IS Express for me. Does anyone care to disagree? I think my options are:

1. Include dummy files in the MSI so no folders are empty. Yuk. Would have to remember to do that for new projects too.

2. Call out to an executable I write at the end of the install which sets those registry key values to zero. Would that fix it though?

3. Use ORCA to manipulate the MSI. Yuk. And would need to resign package digitally afterwards.

4. Call out to an exe as first uninstall action to set regkeys to zero.

5. - and my choice - call out to an executable i write at the end of the uninstall which deletes empty folders and deletes the remaining reg keys.

Why is this behaviour happening though? Seems odd default behaviour for an MSI. Who would want that?

thanks for advice