InstallShield: Uninstalling program not removing all folders
Asked Answered
P

1

7

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.

Pilewort answered 16/10, 2010 at 17:1 Comment(0)
T
9

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.

Tryparsamide answered 18/10, 2010 at 14:7 Comment(9)
How do you this in Installshield Express? Is it possible?Punctilious
I'm not sure if you can or not. Express is meant to be simple and hides a lot of MSI concepts. I have tricks if Express will let you consume a merge module. I assume it will.Tryparsamide
Express can consume a merge module, but I don't understand how a merge module could cause a folder to be deleted at uninstall.Punctilious
A merge module is just a portion of a Windows Installer database that gets merged into the final database at build time. Once it's merged it doesn't exist. It's just a way of abstracting out portions of setup logic ( in this case RemoveFiles table information ) into a discrete chunk.Tryparsamide
blog.deploymentengineering.com/2011/01/… blog.deploymentengineering.com/2011/01/…Tryparsamide
Would Visual Studio's merge module creation tool allow manipulation of the RemoveFiles table?Punctilious
Nope. Unless you count building once a simple 1 file merge module and then usig Orca to author the additional table and data into the static module. Visual Studio Deployment projects are quite horrible for sooo many resons and why they won't be in the next release of Visual Studio.Tryparsamide
What about putting empty files in the MSI with the same name as files that the app will create? Would the MSI uninstall them or are they considered modified files and therefore not uninstalled? I am thinking of log files that will be created in %APPDATA%.Punctilious
Perhaps you should post your questions as questions.Tryparsamide

© 2022 - 2024 — McMap. All rights reserved.