Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

InstallShield: Uninstalling program not removing all folders

I am using Installshield 2010. I made a basic MSI setup, and I am having a problem with uninstalling.

Uninstalling does not remove all folders.

After a complete install, I then uninstall only to find that there is still a path leftover.

For example, C:\ProgramFiles\CompanyName\Account\User_1234.xml still remains, while everything else is gone.

The User_1234.xml file is generated by the application, and this file is not normally in the install process. So it makes sense why this file may have some problems getting rid of it (installer side).

At the same time, I would think that it would be removed due to the fact that it is within the CompanyName folder.

Is there any way to specify to get rid of everything inside and including the CompanyName folder?

Thanks for any ideas.

like image 270
Kyle Sprick Avatar asked Oct 16 '10 17:10

Kyle Sprick


People also ask

How do I delete a folder in InstallShield?

In the Setup Design or Components tree, expand the node of the component that contains the file or folder that you want to be removed, and then click the Files subnode. 3. Right-click in the Files pane and click Add File Removal. The Properties dialog box opens.


1 Answers

You have a couple problems and I'll address the obvious one first. Yes, Windows Installer default behavior is to not delete user data. This could be files not installed by the installer or files that were modified since the installer modified them. To get the installer to remove them, you must author the RemoveFiles table to teach it which files to remove.

Remove Files Table (Windows Installer)

Now I'll address the less obvious problem. You shouldn't expect your application to be able to write to ProgramFiles at runtime. I don't know what your software does but you should seriously consider this aspect of your application design.

like image 152
Christopher Painter Avatar answered Sep 24 '22 20:09

Christopher Painter