File permissions across user profiles

余生长醉 提交于 2019-12-04 12:11:06

IIRC, You can reference the All Users Application Data folder in click once apps.

What you do is distribute your default configuration to the normal application data folder for each app, but never read config information from that file. Instead, on app startup you look in your All users application data folder for the config file, and if you don't find it copy the default file there. Then read in your config from that location.

Mark Bostleman

Based on this SO post I did this:



FileSecurity fileSecurity = File.GetAccessControl(file); fileSecurity.AddAccessRule(new FileSystemAccessRule("Users", FileSystemRights.FullControl, AccessControlType.Allow)); File.SetAccessControl(file, fileSecurity);

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!