Modify Account System

Private Funcition Modifikasi (yVal strUser As string, ByVak blnEnable As boolean) as Boolean

Dim oInfo As New WinNTSystemInfo

Dim strDomain As String


Dim oDomain as Object

Dim oDomain=getObject(“WinNT://” & strDmain)


Dim oUser As IADsUser

For Each oUser In oDomain

if strUser=oUser.Name Then

oUser.AccountDiabled=Not blnEnable



End if

Next oUser

Set oUser=Nothing

Set oDomain=Nothing

Set oInfo=Nothing

Private Sub command1_click()

if modifikasi(“Guest”,true) Then

MsgBox(“Account Guest diaktifkan”)


msgBox (“Operasi gagal”)

end if

end sub

Private sub command2_click()

if modifikasi (“Guest”,False) Then

MsgBox (“Account Guest di nonaktifkan”)


MsgBox (“Operasi gagal”)

End if

End Sub


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s