如何通过ASP管理NT帐号(2)
ChangeUserObj.FullName = FullName
ChangeUserObj.SetInfo
response.write "帐号全名修改成功!<br>"
end if
'修改帐号说明
if Info<>"" then
UserFullName = ChangeUserObj.get("Description")
ChangeUserObj.Description = Info
ChangeUserObj.SetInfo
response.write "帐号说明修改成功!<br>"
end if
Set ChangeUserObj=nothing
End Function
Function DelUser(Computer,UserName)
Set DelUserObj = GetObject("WinNT://"&Computer&"/"&UserName)
If Err = &H800401E4 Then
Response.Write "用户"&UserName&"不存在"
Response.End
End If
Set DelObj = GetObject(DelUserObj.Parent)
DelObj.Delete "User", DelUserObj.Name
Set DelUserObj = Nothing
Set DelObj = Nothing
Response.Write "删除成功"
End Function
内容版权声明:除非注明,否则皆为本站原创文章。