public void AddSysUser(string domain,string UserName,string UserPwd)
{
DirectoryEntry deObj=null;
try
{
deObj=new DirectoryEntry("WinNT://" + domain);
DirectoryEntries deCnt=deObj.Children;
DirectoryEntry objUser=deCnt.Add(UserName,"User");
objUser.Properties["FullName"].Add("stTest");
objUser.Invoke("SetPassword",UserPwd);
objUser.CommitChanges();
}
catch
{
throw ;
}
}