General settings in Task Scheduler using C#
<p>I would like to set the "Configure for" setting in Task Scheduler to "Windows 7". </p>

<p>Current C# code:</p>

<pre><code> using (TaskService ts = new TaskService())
 {
    TaskDefinition td = ts.NewTask();
    TimeTrigger trigger = new TimeTrigger();
    var startTime = TimeSpan.Parse(section1["ScheduledTime"]);
    trigger.StartBoundary = DateTime.Today + startTime;
    trigger.Repetition.Interval = TimeSpan.FromDays(1);
    td.Triggers.Add(trigger);  
    td.Actions.Add(new ExecAction(@"Data.exe", argument, null));
    var foldername = ts.GetFolder(@"\Bigdata");
    Console.WriteLine(foldername.Path);                                
    foldername.RegisterTaskDefinition(section1["JobName"], td, TaskCreation.CreateOrUpdate, "service@geotab.local", "traincloudCubel!ne");
  }
</code></pre>

<p>Any help would be appreciated !!</p>

<p><a href="https://i.stack.imgur.com/xfDOi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xfDOi.png" alt="enter image description here"></a></p>