Windows Vista VirtualStore Problem
This page discusses a file aliasing mechanism in Windows Vista called “File and Registry Virtualization”, the problem it may cause, and solutions.
Summary
When you edit a file in
C:/Program Files/
and if you do not have admin privilege, Vista will actually create a new file of your modification at
%HOMEPATH%\AppData\Local\VirtualStore\
instead. This is ok for some program, but some other program won't recognize the VirtualStore copy.
To solve this problem, make sure that you have admin rights when
you want to edit some config file in C:/Program Files/
. You can do
this by right click your text editor and choose “Run as
administrator”.
Detail
In 2009-09, i'm installing a new version of
ErgoEmacs, which me and David Capello is developing. The new version didn't work for me, because, apparently some previous version of elisp files are still in my program installation dir at C:/Program Files (x86)/ErgoEmacs
. After de-installing and installing several times, still the same problem.
I was quite frustrated. After hours of looking into the problem, apparently the problem isn't the new release, but just on my machine. It seems there's some file caching going on, but just couldn't figure out what. At one point, i suspected that my file system is corrupted. This whole incidence has caused me some 20 hours.
(See this discussion at ergoemacs forum: http://groups.google.com/group/ergoemacs/msg/4fd4d50d1a1bb863)
Today, David wrote to me pointing out that the problem could be Vista's file virtualization. Bingo, that was it. Here's what it means.
In Vista, dir path such as C:\Program Files (x86)\
is not supposed to be accessible for normal users. But many old programs still write to that dir for user data. So, when the program tries to do that, and OS detects that the user has no privilege, it will write to C:\Users\‹your account name›\AppData\Local\VirtualStore\Program Files (x86)\
instead. This means, some application that view directories will get confused.
- When you view the dir at
C:\Program Files\
, some app will show the VirtualStore content, while others will not. For example, emacs's dired will see VirtualStore content. But Windows Explorer, cmd.exe, PowerShell won't. - Some application will read the config files in your VirtualStore location, some won't. Example of those won't are: {Emacs, Microsoft IntelliType Pro}.
The masking of files also is the source of a mysterious problem i have when trying to work with IntelliTypo software. I tried to edit a config file at C:\Program Files\Microsoft IntelliType Pro\
, but intended effect won't show. It costed me some 10 hours over several days.
〔see Microsoft IntelliType Hacks〕
The file virtualization happens to registry too. References:
- Inside Windows Vista User Account Control , by Mark Russinovich. At http://technet.microsoft.com/en-us/magazine/2007.06.uac.aspx
- Achieve the Non-Admin Dream with User Account Control , by Alex Heaton. At http://technet.microsoft.com/en-us/magazine/2006.11.uac.aspx
- Blog: Vista Virtual Store or “Where did my files go?” , by Darrell. At http://www.windyweather.net/wp/2008/09/29/vista-virtual-store/
In Windows 7, ErgoEmacs will recognize the files in the VirtualStore location.