I need to change permision of the shared directory which is on my domain, from "Read and execute" to "Full control" from my C# windows application. The application is started from non administrator user. Becasue of this I understand that i can’t change the permision via standart method:
DirectoryInfo dInfo = new DirectoryInfo(FileName); DirectorySecurity dSecurity = dInfo.GetAccessControl(); dSecurity.AddAccessRule(new FileSystemAccessRule(Account, Rights, ControlType)); dInfo.SetAccessControl(dSecurity);
Is there any way my application (started from non administraotr user) to use administrator password (like string) to change directory permision?
Source: Windows Questions