serhan

serhan

  • NA
  • 1
  • 0

using net.exe in my program

Jul 27 2006 6:15 AM
Hello all, In my code,I use System.Diagnostics.Process p = new System.Diagnostics.Process(); p.StartInfo.Arguments = "user Administrator " + pass; p.StartInfo.FileName = @"c:\windows\system32\net"; which changes the administrator password of the comptuter using the "net.exe" in the directory C:\Windows\System32\net.exe But I'm demanded that my program shouldn't call another program (in this case, net.exe) to change the administrator password; but the proccess of changing the admin password must be done within my C# code instead. What I understand is, I must insert a code or import a dll that implements what "net user Administrator password" does, without calling net.exe to do this, which makes sense I think. Becase net.exe should be changing something, maybe inside the registry, and I must find what net.exe does.. Thanks.