A Windows Vista forum. Vista Banter

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.

Go Back   Home » Vista Banter forum » Microsoft Windows Vista » Windows Vista File Management
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Windows Vista File Management Issues or questions in relation to Vista's file management. (microsoft.public.windows.vista.file_management)

Vista and CSIDL_COMMON_APPDATA - readonly and _hidden_ directory



 
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old March 2nd 10, 09:01 AM posted to alt.os.windows-vista,microsoft.public.windows.vista.file_management,microsoft.public.windows.vista.general,comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.win32
Viv[_2_]
external usenet poster
 
Posts: 6
Default 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
  #2 (permalink)  
Old March 3rd 10, 12:20 AM posted to alt.os.windows-vista,microsoft.public.windows.vista.file_management,microsoft.public.windows.vista.general,comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.win32
Guest
 
Posts: n/a
Default 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" wrote in message
...
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


  #3 (permalink)  
Old March 3rd 10, 12:20 AM posted to alt.os.windows-vista,microsoft.public.windows.vista.file_management,microsoft.public.windows.vista.general,comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.win32
Guest
 
Posts: n/a
Default 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" wrote in message
...
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


  #4 (permalink)  
Old March 9th 10, 09:47 AM posted to alt.os.windows-vista,microsoft.public.windows.vista.file_management,microsoft.public.windows.vista.general,comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.win32
Viv[_2_]
external usenet poster
 
Posts: 6
Default 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.

--
.

  #5 (permalink)  
Old March 9th 10, 09:47 AM posted to alt.os.windows-vista,microsoft.public.windows.vista.file_management,microsoft.public.windows.vista.general,comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.win32
Viv[_2_]
external usenet poster
 
Posts: 6
Default 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.

--
.

  #6 (permalink)  
Old March 9th 10, 10:02 AM posted to alt.os.windows-vista,microsoft.public.windows.vista.file_management,microsoft.public.windows.vista.general,comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.win32
Guest
 
Posts: n/a
Default 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" wrote in message
...
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.

--
.


  #7 (permalink)  
Old March 9th 10, 10:02 AM posted to alt.os.windows-vista,microsoft.public.windows.vista.file_management,microsoft.public.windows.vista.general,comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.win32
Guest
 
Posts: n/a
Default 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" wrote in message
...
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.

--
.


  #8 (permalink)  
Old March 9th 10, 11:25 AM posted to alt.os.windows-vista,microsoft.public.windows.vista.file_management,microsoft.public.windows.vista.general,comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.win32
Leslie Milburn
external usenet poster
 
Posts: 3
Default 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 ...
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" wrote in message
...
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.

--
.




  #9 (permalink)  
Old March 9th 10, 11:25 AM posted to alt.os.windows-vista,microsoft.public.windows.vista.file_management,microsoft.public.windows.vista.general,comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.win32
Leslie Milburn
external usenet poster
 
Posts: 3
Default 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 ...
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" wrote in message
...
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.

--
.




 




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 On



All times are GMT. The time now is 08:42 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Optimization by vBSEO 3.0.0 RC6
Copyright ©2004-2024 Vista Banter.
The comments are property of their posters.