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

strDomain=oInfo.Domainname

Dim oDomain as Object

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

oDomain.Filter=Array(“User”)

Dim oUser As IADsUser

For Each oUser In oDomain

if strUser=oUser.Name Then

oUser.AccountDiabled=Not blnEnable

oUser=SetInfo

Modifikasi=trus

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”)

Else

msgBox (“Operasi gagal”)

end if

end sub

Private sub command2_click()

if modifikasi (“Guest”,False) Then

MsgBox (“Account Guest di nonaktifkan”)

Else

MsgBox (“Operasi gagal”)

End if

End Sub

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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