![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| | |||||||
| | Vista - System Permissions (followup) |
| |
| 09-03-2009 | #1 |
| | System Permissions (followup) Following my previous post regarding System Permissions the scenario has changed. This program of ours will run on installation by the administrator. It will create a folder in documents and settings\allusers\application data It will then create a file in that folder called config.txt (let us say) I need at this point to be able to set the system permissions for this file so that all users who log on have security permissions to write to this file at this point. When other users log in I want them to have write permissions to this file. I have mamaged to create the file as read/write for the administrator, but not change the permissions yet. Can THIS be done please and HOW? |
| My System Specs |
| 09-03-2009 | #2 |
| | Re: System Permissions (followup) On 3 sep, 12:08, ngrTerry <n...@xxxxxx> wrote: Quote: > Following my previous post regarding System Permissions the scenario > has changed. > > This program of ours will run on installation by the administrator. > > It will create a folder in documents and settings\allusers\application > data > It will then create a file in that folder called config.txt (let us > say) > > I need at this point to be able to set the system permissions for this > file so that all users who log on have security permissions to write > to this file at this point. > > When other users log in I want them to have write permissions to this > file. > > I have mamaged to create the file as read/write for the administrator, > but not change the permissions yet. > > Can THIS be done please and HOW? Something like this, maybe: System.Security.AccessControl.FileSecurity fs = new System.Security.AccessControl.FileSecurity(); fs.AddAccessRule(new System.Security.AccessControl.FileSystemAccessRule("All Users", System.Security.AccessControl.FileSystemRights.Write, System.Security.AccessControl.AccessControlType.Allow)); System.IO.File.SetAccessControl("c:\\documents and settings \\allusers\\applicationdata\\config.txt", fs); |
| My System Specs |
![]() |
| Thread Tools | |
| |
| Similar Threads for: System Permissions (followup) | ||||
| Thread | Forum | |||
| Overriding System Permissions | .NET General | |||
| Programs - Replace System Program without Modifying System Files or Permissions | Tutorials | |||
| Can I make a followup to | Vista mail | |||
| Permissions for system files | Vista file management | |||
| Microsoft documentation about file system permissions | Vista security | |||