Thread View: borland.public.cppbuilder.nativeapi
5 messages
5 total messages
Started by Kris
Mon, 30 Jul 2007 11:04
Is CSIDL_COMMON_APPDATA read-only for some users ?
Author: Kris
Date: Mon, 30 Jul 2007 11:04
Date: Mon, 30 Jul 2007 11:04
28 lines
2237 bytes
2237 bytes
My application stores data that needs to be accessible for all users on the system. Each users must also be able to update this shared data. For this purpose I'm use the CSIDL_COMMON_APPDATA location (e.g. on XP this is C:\Documents and Settings\All Users\Application Data). This works great for me. However, while googling I found several references where this folder is sometimes read-only. MSDN shows me this: http://msdn2.microsoft.com/en-us/library/ms995853.aspx "CSIDL_COMMON_APPDATA: This folder should be used for application data that is not user specific. By default, this location is read-only for normal (non-admin, non-power) Users. If an application requires normal Users to have write access to an application specific subdirectory of CSIDL_COMMON_APPDATA, then the application must explicitly modify the security on that sub-directory during application setup." Strangely enough, I tried to reproduce this problem both on XP and Vista by using a non-admin user. But I never encountered a problem writing to this folder (even using Windows Explorer as limited user still allowed full write-access to CSIDL_COMMON_APPDATA). So, I was wondering if someone has any experience with write permission issues in CSIDL_COMMON_APPDATA when dealing with different user accounts? Thanks, Kris
Re: Is CSIDL_COMMON_APPDATA read-only for some users ?
Author: Remy Lebeau (TeamB)
Date: Mon, 30 Jul 2007 17:13
Date: Mon, 30 Jul 2007 17:13
14 lines
1409 bytes
1409 bytes
"Kris" <test@test.com> wrote in message news:46adc5ec$1@newsgroups.borland.com... > For this purpose I'm use the CSIDL_COMMON_APPDATA > location. This works great for me. However, while googling I > found several references where this folder is sometimes read-only. The CSIDL... folder itself may be read-only, yes. Don't try to write to the folder directly. You are supposed to append your own read/write subfolder to it. Gambit
Re: Is CSIDL_COMMON_APPDATA read-only for some users ?
Author: Miguel Gimenez
Date: Tue, 31 Jul 2007 11:17
Date: Tue, 31 Jul 2007 11:17
20 lines
1861 bytes
1861 bytes
Remy Lebeau (TeamB) wrote: > "Kris" <test@test.com> wrote in message > news:46adc5ec$1@newsgroups.borland.com... > >> For this purpose I'm use the CSIDL_COMMON_APPDATA >> location. This works great for me. However, while googling I >> found several references where this folder is sometimes read-only. > > The CSIDL... folder itself may be read-only, yes. Don't try to write to the > folder directly. You are supposed to append your own read/write subfolder > to it. How can I append the subfolders if I can't write to CSIDL_COMMON_APPDATA? I was planning to do my own installer, who should create the "Company Name\Product Name\Version" folder tree, but now I'm in doubt if it can be done. Should the installer be executed by the administrator, or there is another trick? Regards Miguel Gimenez
Re: Is CSIDL_COMMON_APPDATA read-only for some users ?
Author: Alan Bellingham
Date: Tue, 31 Jul 2007 11:26
Date: Tue, 31 Jul 2007 11:26
14 lines
1506 bytes
1506 bytes
Miguel Gimenez <me@privacy.net> wrote: >in doubt if it can be done. Should the installer be executed by the >administrator, or there is another trick? That's the usual case. You may well need Administrator access to add new folders to the Program Files folder anyway. Once installed, few programs should then need Administrator access. Alan Bellingham -- Team Browns ACCU Conference 2008: 2-5 April 2008 - Oxford (probably), UK
Re: Is CSIDL_COMMON_APPDATA read-only for some users ?
Author: Kris
Date: Tue, 31 Jul 2007 17:04
Date: Tue, 31 Jul 2007 17:04
25 lines
2193 bytes
2193 bytes
Miguel Gimenez wrote: > How can I append the subfolders if I can't write to > CSIDL_COMMON_APPDATA? I was planning to do my own installer, who should > create the "Company Name\Product Name\Version" folder tree, but now I'm > in doubt if it can be done. Should the installer be executed by the > administrator, or there is another trick? > > Regards > Miguel Gimenez Even though while googling I found several references to write permission issues with CSIDL_COMMON_APPDATA I was unable to reproduce any problems when writing to this folder (both on Vista and XP I logged in as a limited user and had no problems creating folders and writing files in CSIDL_COMMON_APPDATA). Neverteless, to be absolutely sure this isn't going to be an issue I also modified my installer script (which requires admin priviliges since I need to write to \program files anyway) to modify the NTFS ACL (access control list) of the CSIDL_COMMON_APPDATA subfolder so that everyone always has full read/write access to this subfolder. This should take care of any problems that otherwise still might arise. Better safe than sorry. Kris
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads