Sharing a file between restricted users and user with administrativeauthorities

  • Thread starter Thread starter Marcus
  • Start date Start date
M

Marcus

Hi

I am trying to share files between restricted users and users with
administrative authorities. I want both users to be able to open the
files for both reading and writing.
I am running the application on Vista.
I have tried putting the files on the path:

Environment.GetFolderPath(System.Environment.SpecialFolder.CommonApplicationData));

This puts them in C:\ProgramData on Vista.

I have read this should be the place for file sharing. I do get
exception though when the restricted user tries to access a file.

I dont know how many hours I have put on this. I just cant seem to get
this file sharing to work.

ps.
This may be off topic. I could not find a really suitable place for
this question, sorry for this.
 
Marcus said:
I am trying to share files between restricted users and users with
administrative authorities. I want both users to be able to open the
files for both reading and writing.
I am running the application on Vista.
I have tried putting the files on the path:

Environment.GetFolderPath(System.Environment.SpecialFolder.CommonApplicationData));

This puts them in C:\ProgramData on Vista.

I have read this should be the place for file sharing. I do get
exception though when the restricted user tries to access a file.

As I recall from the Vista programming guidelines, the installer for your
program should create a folder for itself in ProgramData, and assign the
appropriate permissions to it (in your case - read/write to Everyone). It's
not writable by default, by design. You might find this utility handy for
that:

http://www.codeproject.com/KB/security/acl_common_data.aspx
 
Back
Top