cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Holger_G
Level 10

Conditionally uninstallation of application and user data

hi,

our application creates some user setting files and database files.
These files should be removed conditionally (checkbox on ReadyToRemove dialog).

Question 1:
Can these files and folders being removed using MSI tables or do they have to be removed inside a custom action?

Question 2:
Installation is a per-machine installation but user settings will be stored for each user by the application. Can these be uninstalled for all users or only for the current user?

-Holger
Labels (1)
0 Kudos
(2) Replies
Holger_G
Level 10

anyone please?
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

The only built-in option for 1 is the RemoveFile table, which can remove associated files when a component is installed or uninstalled. At uninstall, this can only be an component uninstall, and unfortunately there is no way to condition that. You might be able to fake out conditioning by creating an extra Directory entry and carefully setting it to something unusable, but I don't think I'd recommend that sort of trick, even if it works. So yeah, go custom action.

For 2, built-in will only handle the current user, and that only if it's resources installed by the .msi tables. If this configuration is supplied by the application when it runs, etc., there's nothing built-in for the uninstall. In general it is recommended that configuration be left behind so user B doesn't lose settings when user A uninstalls and reinstalls a per-machine installation.
0 Kudos