C# Checking if remote desktop is enabled on a windows client
<p>Is there any way I can detect if remote desktop is enabled on windows xp/vista/7. I know that you can access the session information using performance counters but what I really need is a enabled/disabled flag?</p>

<pre><code>PerformanceCounter performanceCounter = new PerformanceCounter("Terminal Services", "Active Sessions");
</code></pre>

<p>Thanks</p>
