[Qt-interest] Windows 7 and VirtualStore woes

Noah noah at pcc.com
Thu Sep 10 21:57:57 CEST 2009


Don't write to the Program Files directory. Use the %APPDATA% directory 
instead.

The VirtualStore was created as a compatibility layer for software that 
(incorrectly) writes to the program files directory. In an ideal world 
it wouldn't exist and all the software that was designed to write user 
data to the program files directory would be thrown out. Microsoft has a 
long history of preferring backwards compatibility over idealism.

  - Noah

Oliver Demetz wrote:
> Hi!
> 
> Today I have been shocked by the absolutely needles concept of this 
> f**king VirtualStore.
> 
> Ok. Here is my situation:
> I have two apps: My main app, and an Update-Tool that fetches Updated 
> exe's from the web.
> 
> Everytime my main app starts (as normal user), it writes its 
> applicationVersion string into a plain text file called "VERSION" in the 
> program dir (i.e. c:\Program Files\Myapp\).
> 
> Ok. I found out now, that this file access is redirected to the 
> VirtualStore somwhere in the user home-dir.
> 
> My update-tool - and this is already the problem - is automatically 
> recognised by windows to be necessarily run with admin rights. So if I 
> click the exe or a shortcut, windows automatically asks me for the rights.
> 
> This leads to the fact that the access to the "VERSION" file is *not* 
> redirected to the virtualStore. Thus, both programs use different files.
> 
> What is the standard way to solve this problem?
> 
> Remark: the best, easiest and simplest way of downgrading to
>         good-old windows xp  is unfortunately impossible in my case ;-)
> 
> 
> Thanks for your help in advance,
> Oliver



More information about the Qt-interest-old mailing list