Sunday, August 12, 2007

Vista Weirdness - Directory exists via an installer, but not in Explorer

This took me a while to figure out - today I went to install Jetspeed Portal Server and it needed access to a specific file, so I browsed to C:/Program Files. See the contents in the first screenshot.

I remember uninstalling Alien Arena 2007 but the directory was still there. Grrr, okay it didn't clean up when I uninstalled it... so I browse to C:/Program Files.... and guess what the directory does not exist - it's not there (see second screenshot).

What the hell? Is this some out of date index used by the installer to list directory contents or some weird Vista registry thing?

No. It is a feature called "VirtualStore". Simply put, older versions of Windows stored user accessible data inside Program Files, which is quite naughty since this should be a secure location and non user accessible (i.e. administrator only). What Vista does is redirect this sort of request invisibly to a user accessible area a "VirtualStore", and the program installs here, typically this is at C:\Users\< your user>\AppData\Local\VirtualStore\Program Files. The same goes for the system registry. When you uninstall or delete the program from explorer or by uninstaller it may not necessarily uninstall it from this location - hence the problem of the Alien Arena 2007 directory.

For more details see this useful article

No comments: