File and registry virtualisation in Windows 7 and Vista

File and registry virtualisation in Windows 7 and Vista is a new technology that deals with the requirement of some applications to be able to write data in locations where the user does not have access permissions, as well as the user inadvertently choosing these locations. The latter functionality in particular can trip you or your users up and perhaps it is better to educate your users about the limitations of saving their data into “system reserved” locations.

For example C:Program Files (or the equivalent for different boot drive letters) is such a location and you may find (as I did this week) that attempting to save data files from an application into this directory will result in the file “disappearing” or “appearing”. In this case I found I could see a view of the file only in the Save dialog of the exact application that created it. Explorer wouldn’t display the file at all.

After looking into this I found a resource on MSDN that details this process. In this case the file is being written into a subdirectory of C:Users<username>AppDataLocalVirtualStore and actually did exist in that location when I checked. The point of what was in its original location is that it looked like a file, not a shortcut to a file that was stored somewhere else.

These technologies appear to be targeted at legacy applications in that they only apply to 32 bit apps, not 64 bit for example. As such they fit in with applications that wouldn’t meet the current Windows Logo cert requirements.