support

download helpfile

FAQ and samples

download a patch

 

     

  ntXdll FAQ

 

english version   deutsche Version  

 

   disabling an user
(VBS)
 

 

 

Option Explicit

Const PDC = "MyPDC"

Dim sUser
Dim oUsr
Dim lRes

Set oUsr = CreateObject("ntXdll.UserManager")

sUser = InputBox("Computers with '$' at the end", "UserName")

lRes = oUsr.GetUserInfo(sUser, PDC)
If lRes <> 0 Then MsgBox "Error " & lRes

MsgBox "User disabled: " & oUsr.AccountDisabled

If oUsr.AccountDisabled = False Then oUsr.AccountDisabled = True

If oUsr.LastError <> 0 Then
        MsgBox "Error " & oUsr.LastError
Else
        MsgBox "successfully changed"
End If

   
 Copyright © 1999-2003 Frank Seidel last update 09/27/2003  this site was created with Namo