Re: Problems with AppData on Vista.



Chris Becke wrote:
I posted this question in win32.programmer.kernel, but subsequently
realized this NG is probably a better place:-

I have an application that needs to share data between users. To this end
I create a folder using SHGetSpecialFolderLocation with
CSIDL_COMMON_APPDATA. This returns C:\ProgramData on vista. I then create
a subfolder in there for my app.

This works for the first user.

The 2nd user that comes along and attempts to read/write the common data
files gets virtualized off to someplace inside their profile. This is
unwanted.

I actaually want to share data between users.

Have I misunderstood the purpose of c:\ProgramData ? How is it the common
appdata store if subsequent users get Access Denied / virtualized?

And, What then is the simplest way to ensure that different non-admin
users actually can access data? c:\SomeFolderOfMyOwn ? Or do I *really*
need to fiddle with ACLs on my c:\ProgramData folder? Ive avoided the
security APIs for a loong time. For a lot of that time the avoidance was
pragmatic - I needed my app to deploy and run on 95/98/ME. Getting this
App vista compatible however is turning out to be a PITA.

Whats the magic sauce to get common app data to be common on Vista?

I think that the standard is for your installer to create a subdirectory of
the CSIDL_COMMON_APPDATA directory named for your company, then a
subdirectory of that directory named for your application. You can give
those directories whatever ACLs you deem appropriate for the type of sharing
you want to do. It is all explained fairly well in this article, which
although written for Windows 2000, still seems to be applicable to Vista.

http://msdn2.microsoft.com/en-us/library/ms995853.aspx

--
Larry Futrell


.



Relevant Pages

  • Problems with AppData on Vista.
    ... This returns C:\ProgramData on vista. ... The 2nd user that comes along and attempts to read/write the common data ... for a loong time. ... needed my app to deploy and run on 95/98/ME. ...
    (microsoft.public.platformsdk.security)
  • Re: Deployment under Vista
    ... combination of a special path designated by Windows and the current ... Consequently, under Vista CSIDLs were changed into KNOWNFOLDERIDs, ... Let's call my app Fred.exe and it uses say two random access files, ... The Install suggests that the app is placed in C:\Programs. ...
    (microsoft.public.vb.general.discussion)
  • Re: Deployment under Vista
    ... Outlook apparently does not easily allow me step ... this app works perfectly under XP Home. ... The Install suggests putting the app where you set it to. ... you're breaking the Vista rules by putting data in a Program ...
    (microsoft.public.vb.general.discussion)
  • Re: Deployment under Vista
    ... combination of a special path designated by Windows and the current ... Consequently, under Vista CSIDLs were changed into KNOWNFOLDERIDs, ... Let's call my app Fred.exe and it uses say two random access files, ... The Install suggests that the app is placed in C:\Programs. ...
    (microsoft.public.vb.general.discussion)
  • Re: Strange dll problem
    ... I have a strange problem with my app and I can't find a solution. ... Windows XP and Windows Vista. ... with the Unicode build of the Codex library, so I tried a non-Unicode ... the non-Unicode build crashes both in XP ...
    (microsoft.public.vc.mfc)