My blog has moved...
I have a new blog at http://www.geekswithblogs.net/rikoe which will carry my setup-related posts from now on. Ill probably post my recent entry on Resources and Data there soon.
See you there.
My experiences with setup, Windows Installer, InstallShield and WiX.
I have a new blog at http://www.geekswithblogs.net/rikoe which will carry my setup-related posts from now on. Ill probably post my recent entry on Resources and Data there soon.
See you there.
After our company decided to use Windows Installer for all our installs, I held a presentation to the various project teams on Windows Installer technology. One of the most important principles I wanted to get across was the distinction between resources, application data and user data.
This distinction was first made clear to me by this blog from Rob. As I told Vagmi yesterday in a post on the WiX users list, it turned into a real discussion about what exactly the difference is, specifically between user and application data, and what the point is of making a distinction between the two.
So after Vagmi's excellent post about how to deal with application data, allow me my two cents worth about the topic...
1. Resources
As Rob points out resources are the physical building blocks of the application, typically the bits and pieces of your software program that you install. (Think of files, registry entries, shortcuts, virtual directories, databases etc.) In fact, according to his definition, which I've sort of made my own,
Setup is the process of getting the resources that make up a software program transferred from a source and configured on a target machine.You'll notice that this definition mentions setup only as transferring resources, not any other kind of data - which brings me to the other kinds of data.
Installing user data to the My Documents folder, by the way, is another important design guideline to follow, not only because it's in the app spec, but because it makes sense. And it makes sense because:
(The "Designed for Windows XP" specification is a great resource for application design pointers, even if you aren't aiming towards the Windows XP Logo)
3. Application Data
Application data is where it gets tricky. It doesn't have to, but it can. Rob describes it asthe bits a program generates while its running,which is correct, but perhaps not clear enough for people who want to be difficult (like the developers I tried to explain it to). It is data created for use by the application itself (as opposed to user data, which is for the user). Application data can be user-specific but not user-created. This is the important distinction. In fact, application data is more often than not about the user - information like recently saved files, or user preferences.
Why should the install program remove application data? Well, it is important for a program to clean up after itself. If I uninstall a program from my machine, I don't want it to leave odds and ends lying around! Of course, if a program is well written, it will clean up most of its application data itself. For example, a program that creates a .tmp file to help in its processing should delete it after it has finished using it, even if it is stored in location the user doesn't know about. And yet so few programs perform these basic courtesies...
Where should application data be stored - ha, that's simple. In the Application Data folder of course! Every user has a (hidden) Application Data folder under his profile, and there is also a per computer one. But wait, there's also an Application Data folder under the Local Settings folder! Not quite so simple then... For a good discussion of storing application data for roaming vs. non-roaming and per-user vs. per-computer profiles, refer to the "Designed for Windows XP" Application Specification. It also discusses per-user registry entries, another important consideration with application data, and the cause of many a headache.
The most important part of this post was to be "What's the point?", but I've written WAY to much already. So I'll say what the point is in the next post...
When I started working as a developer more than a year and a half ago, I never imagined I'd become a setup developer! But I have been working with installs now for quite a while, and with this blog I want to start documenting some of the things we've learnt, and investigate the technologies we use. (With "we" I mean me and my fellow partner in crime, Shelley - we are the "install people" at my company).