At the Vista talk there was some mention about the new virtualization technologies added in. Basically what happens is that if a program tries to write to a protected area (such as the program files or windows directory) the file actually gets written to the current users profile directory (i.e. c:\documents and settings\<username>\AppData\Local\VirtualStore\Program) instead. This is nice as it protects code from overwriting others files, blowing up the registry (yes the registry is virtualized as well in vista), adds per user files so that another user can not overwrite your changes, and adds some security to prevent people from reading your info. On the other hand people are saying "Where are my files? Its output dir is c:\program files".

So should programs really output / store data in protected areas? Well when you put it that way of course not so bad code! So what should you do? Prompt the user where to save info / config (if they have perms to that directory), write to their profile by default, or use a little thing called isolated storage.

Isolated storage is one of those cool things hidden in .NET I had not heard about until Bristowe said this is how you should be storing config / assembly related files and has been arround since .NET 1.0. Isolated storage is basically another type of file stream that internally delegates the files to the proper location so the developer does not have to worry about pathing. A really cool apparently (I have not verified this) is that by using isolated storage you can save files even if your application does not have rights to the filesystem.

As I said I just discovered this but found this great article on isolated storage for those of us who were oblivious to this technology.