I have an administrator application that works with elevated privileges, and I need it to store some confidential files in a directory that only system administrators can access.
This is probably due to the next call, but I'm not sure how to configure it.
Directory.CreateDirectory(@"C:\SomePath", new AccessControl.DirectorySecurity() { AccessRightType = ?, AccessRuleType = ?, AuditRuleType = ?);
If there is a better way to achieve the same, please let me know. Thank.
EDIT: Found a good implementation here . Leave the question open for one day if there are other suggestions.
source
share