How to get list of processes using C# and Task Scheduler
<p>I'am trying to get list of processes under win2k8 for administration purposes.
I wrote some program in C# similar to this:</p>

<pre><code>        foreach ( Process clsProcess in Process.GetProcesses() )
        {
         //do something
        }
</code></pre>

<p>Everything is working until i schedule my program to run from Task Scheduler.
Apparently program cannot see running processes in that way (got empty list). </p>

<p>Any solution to get list of processes while running program by Task Scheduler?</p>
