本文介绍使用ASP、VB、VBScript删除Windows用户

Function DelUser(Computer,UserName)Set DelUserObj = GetObject("WinNT://"&Computer&"/"&UserName)If Err = &H800401E4 ThenResponse.Write "用户"&UserName&"不存在"Response.EndEnd IfSet DelObj = GetObject(DelUserObj.Parent)DelObj.Delete "User", DelUserObj.NameSet DelUserObj = NothingSet DelObj = NothingResponse.Write "删除成功"End Function

03-15 16:54