Welcome to Vista Banter. You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to ask questions and reply to others posts, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact support. |
|
Windows Vista File Management Issues or questions in relation to Vista's file management. (microsoft.public.windows.vista.file_management) |
|
LinkBack | Thread Tools | Display Modes |
|
|||
Vista and CSIDL_COMMON_APPDATA - readonly and _hidden_ directory
Hi all,
I have an application that uses one configuration file which should be the same for all users. This conf file should also be editable by any user. 1) For Win2000 and WinXP it was not a problem to use the SHGetFolderPath function with CSIDL_COMMON_APPDATA which would then be smth like: "C:\Documents and Settings\All Users\Application Data" and to put there the conf file for my application. The problem is that on Vista the call of SHGetFolderPath/SHGetKnownFolderPath with CSIDL_COMMON_APPDATA gives the: "C:\ProgramData" directory which is read-only and _hidden_. If I put the conf file there the users won't be able to modify the conf file because it's a hidden directory. Is there any other place recommended by Microsoft where one could put the application data that is not _user_ specific and it's not _hidden_? 2) As a possible solution to the above problem I was thinking of using the CSIDL_COMMON_DOCUMENTS. It doesn't sound right to me, but it's the only way out that I found until now. What makes me wonder is that if I print the return value of SHGetFolderPath/SHGetKnownFolderPath with CSIDL_COMMON_DOCUMENTS I get: "C:\Users\Public\Documents" even though in windows explorer is no such directory, it's only the "Public Documents", I mean: "C:\Users\Public\Public Documents". Why is this confusion between "C:\Users\Public\Documents" and "C:\Users\Public\Public Documents"? Thank you in advance, Viv |