private static void GrantFullControlRights(string groupName, string targetDir) { try { WindowsGroupUtil.SetGroupAcl(groupName, targetDir, System.Security.AccessControl.FileSystemRights.FullControl); } catch (Exception e) { throw new Exception(string.Format(ResourceStrings.UnhandledExceptionError, "GrantFullControlRights", e.Message)); } }
private static void DeleteWorkerProcessGroup(string groupName) { try { WindowsGroupUtil.DeleteGroup(groupName); } catch (Exception e) { throw new Exception(string.Format(ResourceStrings.UnhandledExceptionError, "DeleteWorkerProcessGroup", e.Message)); } }
private static void CreateWorkerProcessGroup(string groupName, string groupComment, string accountName) { try { WindowsGroupUtil.CreateGroup(groupName, groupComment); WindowsGroupUtil.AddMemberToGroup(groupName, accountName); } catch (Exception e) { throw new Exception(string.Format(ResourceStrings.UnhandledExceptionError, "CreateWorkerProcessGroup", e.Message)); } }