要如何在本機使用者和群組新增一個user或是群組?用c#

解决方案 »

  1.   

    謝謝jiezhi(风满袖)的回覆,
    能指點需要哪些API函數嗎?
      

  2.   

    http://www.microsoft.com/china/msdn/library/office/office/scripting04132004.mspx?mfr=trueProcess.Start(.....脚本);
      

  3.   

    如果是winapp,你可以用
    Process.Start()
    来实现,例如:
    Process.Start( "net user NewUserName Newpwd /add" );
      

  4.   

    sorry!Add a new user
    Process.Start( "net", "user NewUserName Newpwd /add" );
      

  5.   

    Add a user to a group:
    net localgroup groupname username /add
      

  6.   

    Add a new group
    net group groupname /add