Ganti Password Windows

Desember 31, 2008 at 6:45 am (I T)

Sapa bilang VB 6.0 dah usang tuk di pakai….??

nih saya berikan Tips untuk mengganti password Windows XP/9x.Dengan menfaatkan fungsi NetUserChangePassword pada Netapi32.dll.

CODE:

Option Explicit
Private Declare Function NetUserChangePassword Lib "Netapi32.dll" _
(Domain As Any, User As Any, OldPass As Byte, NewPass As Byte) _
As Long

Private Sub Command1_Click()
Dim H As Long
Dim bServer() As Byte, bUsername() As Byte
Dim bold() As Byte, bNew() As Byte
' Masukan nama computer yg akan diganti passwordnya
bServer = "192.168.0.1" & vbNullChar
'Nama user yg akan diganti passwornya
bUsername = "Administrator" & vbNullChar
'Password lama
bold = "123" & vbNullChar
'Password Baru
bNew = "root" & vbNullChar
H = NetUserChangePassword(bServer(0), bUsername(0), bold(0), bNew(0))
If H = 0 Then
MsgBox "Password telah diganti dengan yang baru", 64
Else
MsgBox "penggantian password gagal", 16
End If
End Sub

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: