調用windows api函數應該能實現...具體哪個函數就不清楚了.去查查

解决方案 »

  1.   

    c#能实现这个 ? 没有听说过  建议 api来实现
      

  2.   

    先去看操作系统的帮助:net user 
    然后,用System.Diagnostics.Process试试: 
    Process Proc = new Process();
    Proc.StartInfo.FileName = "net.exe";
    Proc.StartInfo.RedirectStandardError = true;
    Proc.StartInfo.RedirectStandardOutput = true;
    Proc.StartInfo.RedirectStandardInput = true;
      
    Proc.StartInfo.Arguments = " user " + username + " " + password + " /add /active:yes " + "/expires:never /fullname:" + username @" /usercomment:临时添加";Proc.Start();
    Proc.WaitForExit();
    Proc.Close();
      

  3.   

    thanks,The123(一个正确的问题比一个正确的答案重要得多(Edit and Co)!