[Qt-interest] Windows 7 and VirtualStore woes

Scott Aron Bloom Scott.Bloom at sabgroup.com
Fri Sep 11 00:41:12 CEST 2009


You can use the QT method
QDesktopServices::storageLocation(QDesktopServices::DataLocation ) to
find a valid data location.. (

-----Original Message-----
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Noah
Sent: Thursday, September 10, 2009 12:58 PM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] Windows 7 and VirtualStore woes

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
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest




More information about the Qt-interest-old mailing list