When should the Windows Registry be used for per-user state, and when should we use the filesystem, particularly the user\'s AppData folder? (eg, C:\\Users\\USERNAME\\AppDat
I don't know whether there is a firm rule, but but one thing to consider is that the registry is transacted -- it is safer for concurrent read/write operations. So, if your user data might be written by multiple threads at run time (or if you have multiple exe's in your product package), consider using the registry.
History: One reason (as I heard it) that MS went from .ini files to the registry was precisely to try to handle the concurrent access problem.
.Net (sort of) went back to .ini files in the form of xml .config files, however those config files are not supposed to be written to at runtime (or at least not if there is a chance of concurrent writers/readers).
More info: http://blogs.msdn.com/oldnewthing/archive/2007/11/26/6523907.aspx