使用C#在任务计划程序中进行常规设置

时间:2016-07-07 00:46:41

标签: c# taskscheduler

我想设置"配置"在任务计划程序中设置为" Windows 7"。

当前的C#代码:

"The champions event was bested"
"The player will succeed if he's well rested"

任何帮助都将不胜感激!!

enter image description here

1 个答案:

答案 0 :(得分:4)

td.Settings.Compatibility应该映射到该字段。

请参阅枚举中的xmldoc,了解每个版本在下拉列表中映射的内容。

/// <summary>Defines what versions of Task Scheduler or the AT command that the task is compatible with.</summary>
public enum TaskCompatibility
{
    /// <summary>The task is compatible with the AT command.</summary>
    AT,
    /// <summary>The task is compatible with Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000).</summary>
    V1,
    /// <summary>The task is compatible with Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008).</summary>
    V2,
    /// <summary>The task is compatible with Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2).</summary>
    V2_1,
    /// <summary>The task is compatible with Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012).</summary>
    V2_2,
    /// <summary>The task is compatible with Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016).</summary>
    V2_3,
}