private void Permissionbtn_Click_1(object sender, EventArgs e) { DirectoryInfo myDirectoryInfo = new DirectoryInfo(textBox1.Text); DirectorySecurity myDirectorySecurity = myDirectoryInfo.GetAccessControl(); string User = System.Environment.UserDomainName + "\\" + comboBox1.SelectedItem.ToString(); myDirectorySecurity.AddAccessRule(new FileSystemAccessRule(User, FileSystemRights.ListDirectory, AccessControlType.Deny)); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)