Common setup mistake (please do not remove generated content on upgrade)

By default, Windows Installer never deletes files it doesn’t know of (user files, generated by setup custom action files).

There are big temptation to write uninstall custom action which deletes all files to make directory clear after product deletion.

Please think about upgrade even you working on the first version of your product.

<Custom Action=”REMOVEDIRS” Before=” InstallFinalize”>REMOVE=”ALL”</Custom> – Incorrect (the product customization will be deleted on uninstall and upgrade)

<Custom Action=”REMOVEDIRS” Before=” InstallFinalize”>REMOVE=”ALL” AND NOT UPGRADINGPRODUCTCODE</Custom> – Correct (the product customization will be deleted on uninstall only. The user files and generated files will be available after upgrade).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s