Enable or Disable a User on Local Computer
<p>To enable or disable a user on local computer, I am using the following snippet. </p>

<pre><code>DirectoryEntry localMachine = new DirectoryEntry("WinNT://" + Environment.MachineName);
DirectoryEntry currentUser = localMachine.Children.Find(user, "Administrators");
currentUser.Invoke("AccountDisabled", new object[] { true });
currentUser.CommitChanges();
</code></pre>

<p>I am assigning user as a string. I am getting a "filepath not found error": Comexception Unhandled. </p>

<p>Is anything wrong with my code ?</p>
