Microsoft Windows Vista Community Forums - Vistaheads
Recommended Download



Welcome to the Microsoft Windows Vista Community Forums - Vistaheads, YOUR Largest Resource for Windows Vista related information.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so , join our community today!

If you have any problems with the registration process or your account login, please contact us.

Driver Scanner

Vista and CSIDL_COMMON_APPDATA - readonly and _hidden_ directory

microsoft.public.windows.vista.file management






Speedup My PC
Reply
  #1 (permalink)  
Old 03-02-2010
Viv
 

Posts: n/a
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
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-03-2010
 

Posts: n/a
Re: Vista and CSIDL_COMMON_APPDATA - readonly and _hidden_ directory
C:\Users\Public\Documents is the name of the folder. This folder uses a
desktop.ini for display name purposes. In English it is Public Documents.

--
..
--
"Viv" <vcotirlea@hotmail.com> wrote in message
news:fbopo5pfvcfdembjn0jf71d9t3fmt4cmk7@4ax.com...
> 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


Reply With Quote
  #3 (permalink)  
Old 03-09-2010
Viv
 

Posts: n/a
Re: Vista and CSIDL_COMMON_APPDATA - readonly and _hidden_ directory
Thx for your answer to my second question. Understood.

Any clue about my first question?

Thx,
Viv

On Wed, 3 Mar 2010 12:20:10 +1100, <.> wrote:

>C:\Users\Public\Documents is the name of the folder. This folder uses a
>desktop.ini for display name purposes. In English it is Public Documents.
>
>--
>.

Reply With Quote
  #4 (permalink)  
Old 03-09-2010
 

Posts: n/a
Re: Vista and CSIDL_COMMON_APPDATA - readonly and _hidden_ directory
Read only on a folder means for explorer to treat the folder specially. Note
it does not mean read only on a folder. Anyway the folder isn't read only
but ordinary users don't have write access.

I don't have any solutions for you.
--
..
--
"Viv" <vcotirlea@hotmail.com> wrote in message
news:hn9cp5p9pae75539ihrlht3leoc6m7g1n0@4ax.com...
> Thx for your answer to my second question. Understood.
>
> Any clue about my first question?
>
> Thx,
> Viv
>
> On Wed, 3 Mar 2010 12:20:10 +1100, <.> wrote:
>
>>C:\Users\Public\Documents is the name of the folder. This folder uses a
>>desktop.ini for display name purposes. In English it is Public Documents.
>>
>>--
>>.


Reply With Quote
  #5 (permalink)  
Old 03-09-2010
Leslie Milburn
 

Posts: n/a
Re: Vista and CSIDL_COMMON_APPDATA - readonly and _hidden_ directory
But I do.....

It is a bad idea to allow users to directly modify config files becuase you
have no control over what occurs. What is a better idea is to create your
own cfg.exe which captures the user input and updates the config file
itself. Therefore placement of the file become irrelevant and in fact is an
advantage in an enviornment with a mixture of different versions of windows
due to the folder names being different.

hth
Leslie.


<.> wrote in message news:OKicFg3vKHA.3564@TK2MSFTNGP05.phx.gbl...
> Read only on a folder means for explorer to treat the folder specially.
> Note it does not mean read only on a folder. Anyway the folder isn't read
> only but ordinary users don't have write access.
>
> I don't have any solutions for you.
> --
> .
> --
> "Viv" <vcotirlea@hotmail.com> wrote in message
> news:hn9cp5p9pae75539ihrlht3leoc6m7g1n0@4ax.com...
>> Thx for your answer to my second question. Understood.
>>
>> Any clue about my first question?
>>
>> Thx,
>> Viv
>>
>> On Wed, 3 Mar 2010 12:20:10 +1100, <.> wrote:
>>
>>>C:\Users\Public\Documents is the name of the folder. This folder uses a
>>>desktop.ini for display name purposes. In English it is Public Documents.
>>>
>>>--
>>>.

>



Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
TextArea, ReadOnly, and selecting text Nathan Sokalski microsoft.public.internetexplorer.general 1 10-10-2009 14:43
ReadOnly microsoft.public.windows.vista.networking sharing 1 11-05-2007 04:08
Setting up a directory and moving a file into that directory from gppnrdrj microsoft.public.windows.vista.general 4 07-11-2007 13:06
Setting up a directory and moving a file into that directory from gppnrdrj microsoft.public.windows.vista.general 1 07-11-2007 09:31
Temp Directory acts like media directory Henry Jones microsoft.public.windows.vista.general 2 03-01-2007 02:58




All times are GMT +1. The time now is 10:42.




Driver Scanner - Free Scan Now

Vistaheads.com is part of the Heads Network. See also XPHeads.com , Win7Heads.com and Win8Heads.com.


Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.0 RC 2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120