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.10.1
Syntax
public void SetAccessRule(
	TaskAccessRule rule
)
Request Example View Source

Parameters

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