Konstantin Vlasenko

An engineer is someone who can make for a dollar what any fool could make for two. – Alan Kay

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).

Advertisement

Leave a Reply

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

Gravatar
WordPress.com Logo

You are commenting using your WordPress.com account. 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 )

Connecting to %s

Follow

Get every new post delivered to your Inbox.