Click or drag to resize
Task Scheduler Managed Class Library

TaskSecuritySetAccessRule Method

Removes all access control rules with the same user and AccessControlType (allow or deny) as the specified rule, and then adds the specified rule.

Namespace: Microsoft.Win32.TaskScheduler
Assembly: Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.12.0
Syntax
C#
public void SetAccessRule(
	TaskAccessRule rule
)
Request Example View Source

Parameters

rule  TaskAccessRule
The TaskAccessRule to add. The user and AccessControlType of this rule determine the rules to remove before this rule is added.
See Also