Don’t believe everything you read. |
Binaries aren’t the only place things can get corrupted. Data and settings are another source of potential failures, and are often overlooked. Many applications read settings without ever checking them for validity; don’t trust something just because you read it successfully - a quick sanity check can prevent a lot of problems.
Whenever possible, have a quick and easy way to check to see if your data is valid. User data files could have checksums; registry settings could have an explicit range of possible valid answers or combinations. If you do check your application's settings and find that they are invalid, as long as you’ve followed the data separation and desktop management guidelines, you should be able to handle this smoothly with little extra work. Simply treat and invalid setting like a non-existent one, and drop back to the defaults (or the next level).
The actual task of “repairing” the invalid data is an area of self-repair that needs to be addressed by your application, unfortunately it isn’t something the Microsoft® Windows® Installer can do for you simply with a cool API call.