Installers Can Only Do So Much

In my response to my earlier post about why uninstallers don’t clean up user files, commenter dan suggests that uninstalling and then installing an application should erase application settings. He argues that this would at the very least help users who have applications that don’t work because, for example, the application settings have become corrupt.

The fix is tenuous at best:

  • It won’t work if the application doesn’t opt in. After all, some applications will want to save those settings.
  • It won’t work if AIR can’t determine where the settings are stored. Yes, we provide a location for that—but it’s a suggestion, and not obligatory.
  • It requires the user to intervene (uninstall/reinstall) to fix a problem the application could address for itself.

The point about corrupt user settings is valid; this can happen and effectively disable an application. And I agree, asking users to find the file containing these settings and manually delete them is unreasonable. But the truly simple fix is to code your application so that it can detect and ignore corrupt settings. Get that right, and users may never even realize something went wrong.

2 Responses to Installers Can Only Do So Much

  1. Rosyna says:

    I tend to write code that always considers the settings file(s) to be user modifiable. You can’t trust their contents, so you must error check whenever loading settings.Hopefully the settings file(s) are designed in such a way that they corrupt properly in a spectacular fashion or the application just ignores the settings and makes a new settings file, as if it was never done. (The Mac OS X plists do this)

  2. dan says:

    Hey Oliver,Thanks for taking the time to comment on my concerns. You are correct, applications should account for corrupted configuration files when possible. The specifics of my particular scenario aren’t too important; suffice it to say that it wasn’t as simple as a corrupted config, and involved some stale data and an http-500 error result that wasn’t handled as it should have been.In addition to an AIR application, I also maintain a native Windows application. Generally speaking, the assumption for Windows applications is that uninstalling will remove all related files, including user settings, unless otherwise specified in the uninstaller UI. Not having any way to tell if the user has uninstalled and re-installed makes me feel like I have my hands tied behind my back. Having a “Reset” button that is accessible before loading the config seems odd, and I’m left with trying extremely hard to not have any bugs ever, else I face again having to tell customers to find the %appdata%\AppName.PUBID folder and killing it.I realize that compromises must be made to have the ability to maintain a consistent platform across Windows, Mac, and Linux. You have made a fantastic effort of removing any OS specific stuff from the developer, but this also means sacrificing some functionality.Again, I’m not trying to lay blame, I certainly made the primary mistake, I’d just like to register a request to have some ability to specify the removal of the of the configs on uninstall, or barring that, the ability to know if the user uninstalled and re-installed so that I can respond accordingly.Thanks much!Dan