Sign in to follow this  
Followers 0
Kaso

Account Creator, Password Resets for Windows

4 posts in this topic

#1 ·  Posted (edited)

This is my first GUI and I thought i'd share it. The GUI allows you to create multiple accounts at once, reset passwords for accounts Windoes. Bascially it uses the NET commands. There at 2 tabs to show you what accounts are on the pc and what account sare in the admin group. When you create an account it puts it automatically in the admin group and sets PS expiry to never expire. When you reset it sets to never expire but leaves the account in the group it is. I thought someone out there would benefit from this.

Enjoy, improve, spread the love.

#include <GUIConstants.au3>

GUICreate("Local Windows Account Management",310,300) ; will create a dialog box that when displayed is centered

$tab=GUICtrlCreateTab (-1,-1,310,300)

; Create Tab#1

$tab1=GUICtrlCreateTabitem ("Reset")

GUICtrlSetState(-1,$GUI_SHOW)

if IsAdmin() <> 1 then MsgBox(48,"You do not have suffcient rights..."," The current user is not an Administrator!" & @CRLF & @crlf & "Please sign in with an Administrator account!")

if IsAdmin() <> 1 then Exit

; Labels for Tab#1

$label1 = GUICtrlCreateLabel("Username",14, 30,65)

$label2 = GUICtrlCreateLabel("Password",104, 30,65)

$label3 = GUICtrlCreateLabel("Confirm",200, 30,65)

; UserNames, Passwords and Confirm boxes for Tab#1

$user0 = GUICtrlCreateInput("",10,50,65)

$pass0 = GUICtrlCreateInput("",100,50,65,"",$ES_PASSWORD)

$cpass0 = GUICtrlCreateInput("",190,50,65,"",$ES_PASSWORD)

$user1 = GUICtrlCreateInput("",10,75,65)

$pass1 = GUICtrlCreateInput("",100,75,65,"",$ES_PASSWORD)

$cpass1 = GUICtrlCreateInput("",190,75,65,"",$ES_PASSWORD)

$user2 = GUICtrlCreateInput("",10,100,65)

$pass2 = GUICtrlCreateInput("",100,100,65,"",$ES_PASSWORD)

$cpass2 = GUICtrlCreateInput("",190,100,65,"",$ES_PASSWORD)

$user3 = GUICtrlCreateInput("",10,125,65)

$pass3 = GUICtrlCreateInput("",100,125,65,"",$ES_PASSWORD)

$cpass3 = GUICtrlCreateInput("",190,125,65,"",$ES_PASSWORD)

$user4 = GUICtrlCreateInput("",10,150,65)

$pass4 = GUICtrlCreateInput("",100,150,65,"",$ES_PASSWORD)

$cpass4 = GUICtrlCreateInput("",190,150,65,"",$ES_PASSWORD)

; Buttons for Tab#1

$Button_1 = GuiCtrlCreateButton("Submit",63, 180, 50, 25)

$Button_1_1 = GuiCtrlCreateButton("Clear",155, 180, 50, 25)

$Button_1_2 = GuiCtrlCreateButton("Local Users And Groups",63, 220, 143, 25)

; Sets the focus to the 1st username on Tab#1

GUICtrlSetState($user0, $GUI_FOCUS)

; Create Tab#2 (VOIDED THIS OUT FOR USE AT THIS POINT. MADE THE RESET PASSWORD UNLOCK ACCOUNTS)

;~ $tab1=GUICtrlCreateTabitem ("Unlock")

; Labels

;~ $label4 = GUICtrlCreateLabel("Username",17, 30)

;~ $label5 = GUICtrlCreateLabel("Password",108, 30)

;~ $label6 = GUICtrlCreateLabel("Confirm",203, 30)

; UserNames, Passwords and Confirm

;~ $useru0= GUICtrlCreateInput("",10,50,65)

;~ $passu0 = GUICtrlCreateInput("",100,50,65,"",$ES_PASSWORD)

;~ $cpassu0 = GUICtrlCreateInput("",190,50,65,"",$ES_PASSWORD)

;~ $useru1 = GUICtrlCreateInput("",10,75,65)

;~ $passu1 = GUICtrlCreateInput("",100,75,65,"",$ES_PASSWORD)

;~ $cpassu1 = GUICtrlCreateInput("",190,75,65,"",$ES_PASSWORD)

;~ $useru2 = GUICtrlCreateInput("",10,100,65)

;~ $passu2 = GUICtrlCreateInput("",100,100,65,"",$ES_PASSWORD)

;~ $cpassu2 = GUICtrlCreateInput("",190,100,65,"",$ES_PASSWORD)

;~ $useru3 = GUICtrlCreateInput("",10,125,65)

;~ $passu3 = GUICtrlCreateInput("",100,125,65,"",$ES_PASSWORD)

;~ $cpassu3 = GUICtrlCreateInput("",190,125,65,"",$ES_PASSWORD)

;~ $useru4 = GUICtrlCreateInput("",10,150,65)

;~ $passu4 = GUICtrlCreateInput("",100,150,65,"",$ES_PASSWORD)

;~ $cpassu4 = GUICtrlCreateInput("",190,150,65,"",$ES_PASSWORD)

; Buttons for tab#2 (EVEN THOUGH NOT DISPLAYED, NEEDED IN RUNNING SCRIPT AS IT IS LAYED OUT RIGHT NOW.)

$Button_2 = GuiCtrlCreateButton("Submit",63, 180, 50, 25)

$Button_2_2 = GuiCtrlCreateButton("Clear",155, 180, 50, 25)

; Create Tab#3

$tab2=GUICtrlCreateTabitem ("Create")

; Labels for Tab#3

$label4 = GUICtrlCreateLabel("Username",14, 30,65)

$label5 = GUICtrlCreateLabel("Password",104, 30,65)

$label6 = GUICtrlCreateLabel("Confirm",200, 30,65)

; UserNames, Passwords and Confirm for Tab#3

$user5 = GUICtrlCreateInput("",10,50,65)

$pass5 = GUICtrlCreateInput("",100,50,65,"",$ES_PASSWORD)

$cpass5 = GUICtrlCreateInput("",190,50,65,"",$ES_PASSWORD)

$user6 = GUICtrlCreateInput("",10,75,65)

$pass6 = GUICtrlCreateInput("",100,75,65,"",$ES_PASSWORD)

$cpass6 = GUICtrlCreateInput("",190,75,65,"",$ES_PASSWORD)

$user7 = GUICtrlCreateInput("",10,100,65)

$pass7 = GUICtrlCreateInput("",100,100,65,"",$ES_PASSWORD)

$cpass7 = GUICtrlCreateInput("",190,100,65,"",$ES_PASSWORD)

$user8 = GUICtrlCreateInput("",10,125,65)

$pass8 = GUICtrlCreateInput("",100,125,65,"",$ES_PASSWORD)

$cpass8 = GUICtrlCreateInput("",190,125,65,"",$ES_PASSWORD)

$user9 = GUICtrlCreateInput("",10,150,65)

$pass9 = GUICtrlCreateInput("",100,150,65,"",$ES_PASSWORD)

$cpass9 = GUICtrlCreateInput("",190,150,65,"",$ES_PASSWORD)

; Buttons for Tab#3

$Button_3 = GuiCtrlCreateButton("Submit",63, 180, 50, 25)

$Button_3_3 = GuiCtrlCreateButton("Clear",155, 180, 50, 25)

$Button_3_2 = GuiCtrlCreateButton("Local Users And Groups",63, 220, 143, 25)

; Create Tab#4

$tab3=GUICtrlCreateTabitem ("Local Accounts")

$local = Run("cmd /k net user", @SystemDir, @SW_HIDE, 2)

$outlocal = GuiCtrlCreateEdit("", 0, 20, 310, 300, BitOR($ES_WANTRETURN, $WS_VSCROLL, $WS_HSCROLL, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY))

; Create Tab#5

$tab4=GUICtrlCreateTabitem ("Admin Accounts")

$admin = Run("cmd /k net localgroup administrators", @SystemDir, @SW_HIDE, 2)

$outadmin = GuiCtrlCreateEdit("", 0, 20, 310, 300, BitOR($ES_WANTRETURN, $WS_VSCROLL, $WS_HSCROLL, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY))

; Setting the Label fonts and colors for all tabs.

GUICtrlSetColor ( $label1, 0x191970 )

GUICtrlSetColor ( $label2, 0x191970 )

GUICtrlSetColor ( $label3, 0x191970 )

GUICtrlSetColor ( $label4, 0x191970 )

GUICtrlSetColor ( $label5, 0x191970 )

GUICtrlSetColor ( $label6, 0x191970 )

$font="Arial"

GUICtrlSetFont ($label1, 9, 800, "", $font)

GUICtrlSetFont ($label2, 9, 800, "", $font)

GUICtrlSetFont ($label3, 9, 800, "", $font)

GUICtrlSetFont ($label4, 9, 800, "", $font)

GUICtrlSetFont ($label5, 9, 800, "", $font)

GUICtrlSetFont ($label6, 9, 800, "", $font)

If Not IsDeclared('White') Then Dim $White = 0xffffff

If Not IsDeclared('azure2') Then Dim $azure2 = 0xfffacd

If Not IsDeclared('Black') Then Dim $Black = 0x000000

GUICtrlCreateTabitem (""); end tab item definition

GUISetState ()

; Run the GUI until the dialog is closed

While 1

; Retrival of the Local Accounts

If $local Then

; Calling StdoutRead like this returns the characters waiting to be read

$charsWaiting = StdoutRead($local, 0 , 1)

If $charsWaiting Then

$currentRead = StdoutRead($local)

GUICtrlSetData($outlocal, $currentRead, 1)

EndIf

EndIf

; Retrival of the Admin Accounts

If $admin Then

; Calling StdoutRead like this returns the characters waiting to be read

$charsWaiting = StdoutRead($admin, 0 , 1)

If $charsWaiting Then

$currentRead0 = StdoutRead($admin)

GUICtrlSetData($outadmin, $currentRead0, 1)

EndIf

EndIf

; Colors for the Active box

If ControlGetFocus("Local Windows Account Management") = "Edit1" Then

GUICtrlSetColor($user0, $Black)

GUICtrlSetBkColor($user0, $azure2)

GUICtrlSetColor($user1, $Black)

GUICtrlSetBkColor($user1, $White)

GUICtrlSetColor($user2, $Black)

GUICtrlSetBkColor($user2, $White)

GUICtrlSetColor($user3, $Black)

GUICtrlSetBkColor($user3, $White)

GUICtrlSetColor($user4, $Black)

GUICtrlSetBkColor($user4, $White)

GUICtrlSetColor($pass0, $Black)

GUICtrlSetBkColor($pass0, $White)

GUICtrlSetColor($pass1, $Black)

GUICtrlSetBkColor($pass1, $White)

GUICtrlSetColor($pass2, $Black)

GUICtrlSetBkColor($pass2, $White)

GUICtrlSetColor($pass3, $Black)

GUICtrlSetBkColor($pass3, $White)

GUICtrlSetColor($pass4, $Black)

GUICtrlSetBkColor($pass4, $White)

GUICtrlSetColor($cpass0, $Black)

GUICtrlSetBkColor($cpass0, $White)

GUICtrlSetColor($cpass1, $Black)

GUICtrlSetBkColor($cpass1, $White)

GUICtrlSetColor($cpass2, $Black)

GUICtrlSetBkColor($cpass2, $White)

GUICtrlSetColor($cpass3, $Black)

GUICtrlSetBkColor($cpass3, $White)

GUICtrlSetColor($cpass4, $Black)

GUICtrlSetBkColor($cpass4, $White)

GUICtrlSetColor($user5, $Black)

GUICtrlSetBkColor($user5, $White)

GUICtrlSetColor($user6, $Black)

GUICtrlSetBkColor($user6, $White)

GUICtrlSetColor($user7, $Black)

GUICtrlSetBkColor($user7, $White)

GUICtrlSetColor($user8, $Black)

GUICtrlSetBkColor($user8, $White)

GUICtrlSetColor($user9, $Black)

GUICtrlSetBkColor($user9, $White)

GUICtrlSetColor($pass5, $Black)

GUICtrlSetBkColor($pass5, $White)

GUICtrlSetColor($pass6, $Black)

GUICtrlSetBkColor($pass6, $White)

GUICtrlSetColor($pass7, $Black)

GUICtrlSetBkColor($pass7, $White)

GUICtrlSetColor($pass8, $Black)

GUICtrlSetBkColor($pass8, $White)

GUICtrlSetColor($pass9, $Black)

GUICtrlSetBkColor($pass9, $White)

GUICtrlSetColor($cpass5, $Black)

GUICtrlSetBkColor($cpass5, $White)

GUICtrlSetColor($cpass6, $Black)

GUICtrlSetBkColor($cpass6, $White)

GUICtrlSetColor($cpass7, $Black)

GUICtrlSetBkColor($cpass7, $White)

GUICtrlSetColor($cpass8, $Black)

GUICtrlSetBkColor($cpass8, $White)

GUICtrlSetColor($cpass9, $Black)

GUICtrlSetBkColor($cpass9, $White)

ElseIf ControlGetFocus("Local Windows Account Management") = "Edit2" Then

GUICtrlSetColor($user0, $Black)

GUICtrlSetBkColor($user0, $White)

GUICtrlSetColor($user1, $Black)

GUICtrlSetBkColor($user1, $White)

GUICtrlSetColor($user2, $Black)

GUICtrlSetBkColor($user2, $White)

GUICtrlSetColor($user3, $Black)

GUICtrlSetBkColor($user3, $White)

GUICtrlSetColor($user4, $Black)

GUICtrlSetBkColor($user4, $White)

GUICtrlSetColor($pass0, $Black)

GUICtrlSetBkColor($pass0, $azure2)

GUICtrlSetColor($pass1, $Black)

GUICtrlSetBkColor($pass1, $White)

GUICtrlSetColor($pass2, $Black)

GUICtrlSetBkColor($pass2, $White)

GUICtrlSetColor($pass3, $Black)

GUICtrlSetBkColor($pass3, $White)

GUICtrlSetColor($pass4, $Black)

GUICtrlSetBkColor($pass4, $White)

GUICtrlSetColor($cpass0, $Black)

GUICtrlSetBkColor($cpass0, $White)

GUICtrlSetColor($cpass1, $Black)

GUICtrlSetBkColor($cpass1, $White)

GUICtrlSetColor($cpass2, $Black)

GUICtrlSetBkColor($cpass2, $White)

GUICtrlSetColor($cpass3, $Black)

GUICtrlSetBkColor($cpass3, $White)

GUICtrlSetColor($cpass4, $Black)

GUICtrlSetBkColor($cpass4, $White)

GUICtrlSetColor($user5, $Black)

GUICtrlSetBkColor($user5, $White)

GUICtrlSetColor($user6, $Black)

GUICtrlSetBkColor($user6, $White)

GUICtrlSetColor($user7, $Black)

GUICtrlSetBkColor($user7, $White)

GUICtrlSetColor($user8, $Black)

GUICtrlSetBkColor($user8, $White)

GUICtrlSetColor($user9, $Black)

GUICtrlSetBkColor($user9, $White)

GUICtrlSetColor($pass5, $Black)

GUICtrlSetBkColor($pass5, $White)

GUICtrlSetColor($pass6, $Black)

GUICtrlSetBkColor($pass6, $White)

GUICtrlSetColor($pass7, $Black)

GUICtrlSetBkColor($pass7, $White)

GUICtrlSetColor($pass8, $Black)

GUICtrlSetBkColor($pass8, $White)

GUICtrlSetColor($pass9, $Black)

GUICtrlSetBkColor($pass9, $White)

GUICtrlSetColor($cpass5, $Black)

GUICtrlSetBkColor($cpass5, $White)

GUICtrlSetColor($cpass6, $Black)

GUICtrlSetBkColor($cpass6, $White)

GUICtrlSetColor($cpass7, $Black)

GUICtrlSetBkColor($cpass7, $White)

GUICtrlSetColor($cpass8, $Black)

GUICtrlSetBkColor($cpass8, $White)

GUICtrlSetColor($cpass9, $Black)

GUICtrlSetBkColor($cpass9, $White)

ElseIf ControlGetFocus("Local Windows Account Management") = "Edit3" Then

GUICtrlSetColor($user0, $Black)

GUICtrlSetBkColor($user0, $White)

GUICtrlSetColor($user1, $Black)

GUICtrlSetBkColor($user1, $White)

GUICtrlSetColor($user2, $Black)

GUICtrlSetBkColor($user2, $White)

GUICtrlSetColor($user3, $Black)

GUICtrlSetBkColor($user3, $White)

GUICtrlSetColor($user4, $Black)

GUICtrlSetBkColor($user4, $White)

GUICtrlSetColor($pass0, $Black)

GUICtrlSetBkColor($pass0, $White)

GUICtrlSetColor($pass1, $Black)

GUICtrlSetBkColor($pass1, $White)

GUICtrlSetColor($pass2, $Black)

GUICtrlSetBkColor($pass2, $White)

GUICtrlSetColor($pass3, $Black)

GUICtrlSetBkColor($pass3, $White)

GUICtrlSetColor($pass4, $Black)

GUICtrlSetBkColor($pass4, $White)

GUICtrlSetColor($cpass0, $Black)

GUICtrlSetBkColor($cpass0, $azure2)

GUICtrlSetColor($cpass1, $Black)

GUICtrlSetBkColor($cpass1, $White)

GUICtrlSetColor($cpass2, $Black)

GUICtrlSetBkColor($cpass2, $White)

GUICtrlSetColor($cpass3, $Black)

GUICtrlSetBkColor($cpass3, $White)

GUICtrlSetColor($cpass4, $Black)

GUICtrlSetBkColor($cpass4, $White)

GUICtrlSetColor($user5, $Black)

GUICtrlSetBkColor($user5, $White)

GUICtrlSetColor($user6, $Black)

GUICtrlSetBkColor($user6, $White)

GUICtrlSetColor($user7, $Black)

GUICtrlSetBkColor($user7, $White)

GUICtrlSetColor($user8, $Black)

GUICtrlSetBkColor($user8, $White)

GUICtrlSetColor($user9, $Black)

GUICtrlSetBkColor($user9, $White)

GUICtrlSetColor($pass5, $Black)

GUICtrlSetBkColor($pass5, $White)

GUICtrlSetColor($pass6, $Black)

GUICtrlSetBkColor($pass6, $White)

GUICtrlSetColor($pass7, $Black)

GUICtrlSetBkColor($pass7, $White)

GUICtrlSetColor($pass8, $Black)

GUICtrlSetBkColor($pass8, $White)

GUICtrlSetColor($pass9, $Black)

GUICtrlSetBkColor($pass9, $White)

GUICtrlSetColor($cpass5, $Black)

GUICtrlSetBkColor($cpass5, $White)

GUICtrlSetColor($cpass6, $Black)

GUICtrlSetBkColor($cpass6, $White)

GUICtrlSetColor($cpass7, $Black)

GUICtrlSetBkColor($cpass7, $White)

GUICtrlSetColor($cpass8, $Black)

GUICtrlSetBkColor($cpass8, $White)

GUICtrlSetColor($cpass9, $Black)

GUICtrlSetBkColor($cpass9, $White)

ElseIf ControlGetFocus("Local Windows Account Management") = "Edit4" Then

GUICtrlSetColor($user0, $Black)

GUICtrlSetBkColor($user0, $White)

GUICtrlSetColor($user1, $Black)

GUICtrlSetBkColor($user1, $azure2)

GUICtrlSetColor($user2, $Black)

GUICtrlSetBkColor($user2, $White)

GUICtrlSetColor($user3, $Black)

GUICtrlSetBkColor($user3, $White)

GUICtrlSetColor($user4, $Black)

GUICtrlSetBkColor($user4, $White)

GUICtrlSetColor($pass0, $Black)

GUICtrlSetBkColor($pass0, $White)

GUICtrlSetColor($pass1, $Black)

GUICtrlSetBkColor($pass1, $White)

GUICtrlSetColor($pass2, $Black)

GUICtrlSetBkColor($pass2, $White)

GUICtrlSetColor($pass3, $Black)

GUICtrlSetBkColor($pass3, $White)

GUICtrlSetColor($pass4, $Black)

GUICtrlSetBkColor($pass4, $White)

GUICtrlSetColor($cpass0, $Black)

GUICtrlSetBkColor($cpass0, $White)

GUICtrlSetColor($cpass1, $Black)

GUICtrlSetBkColor($cpass1, $White)

GUICtrlSetColor($cpass2, $Black)

GUICtrlSetBkColor($cpass2, $White)

GUICtrlSetColor($cpass3, $Black)

GUICtrlSetBkColor($cpass3, $White)

GUICtrlSetColor($cpass4, $Black)

GUICtrlSetBkColor($cpass4, $White)

GUICtrlSetColor($user5, $Black)

GUICtrlSetBkColor($user5, $White)

GUICtrlSetColor($user6, $Black)

GUICtrlSetBkColor($user6, $White)

GUICtrlSetColor($user7, $Black)

GUICtrlSetBkColor($user7, $White)

GUICtrlSetColor($user8, $Black)

GUICtrlSetBkColor($user8, $White)

GUICtrlSetColor($user9, $Black)

GUICtrlSetBkColor($user9, $White)

GUICtrlSetColor($pass5, $Black)

GUICtrlSetBkColor($pass5, $White)

GUICtrlSetColor($pass6, $Black)

GUICtrlSetBkColor($pass6, $White)

GUICtrlSetColor($pass7, $Black)

GUICtrlSetBkColor($pass7, $White)

GUICtrlSetColor($pass8, $Black)

GUICtrlSetBkColor($pass8, $White)

GUICtrlSetColor($pass9, $Black)

GUICtrlSetBkColor($pass9, $White)

GUICtrlSetColor($cpass5, $Black)

GUICtrlSetBkColor($cpass5, $White)

GUICtrlSetColor($cpass6, $Black)

GUICtrlSetBkColor($cpass6, $White)

GUICtrlSetColor($cpass7, $Black)

GUICtrlSetBkColor($cpass7, $White)

GUICtrlSetColor($cpass8, $Black)

GUICtrlSetBkColor($cpass8, $White)

GUICtrlSetColor($cpass9, $Black)

GUICtrlSetBkColor($cpass9, $White)

ElseIf ControlGetFocus("Local Windows Account Management") = "Edit5" Then

GUICtrlSetColor($user0, $Black)

GUICtrlSetBkColor($user0, $White)

GUICtrlSetColor($user1, $Black)

GUICtrlSetBkColor($user1, $White)

GUICtrlSetColor($user2, $Black)

GUICtrlSetBkColor($user2, $White)

GUICtrlSetColor($user3, $Black)

GUICtrlSetBkColor($user3, $White)

GUICtrlSetColor($user4, $Black)

GUICtrlSetBkColor($user4, $White)

GUICtrlSetColor($pass0, $Black)

GUICtrlSetBkColor($pass0, $White)

GUICtrlSetColor($pass1, $Black)

GUICtrlSetBkColor($pass1, $azure2)

GUICtrlSetColor($pass2, $Black)

GUICtrlSetBkColor($pass2, $White)

GUICtrlSetColor($pass3, $Black)

GUICtrlSetBkColor($pass3, $White)

GUICtrlSetColor($pass4, $Black)

GUICtrlSetBkColor($pass4, $White)

GUICtrlSetColor($cpass0, $Black)

GUICtrlSetBkColor($cpass0, $White)

GUICtrlSetColor($cpass1, $Black)

GUICtrlSetBkColor($cpass1, $White)

GUICtrlSetColor($cpass2, $Black)

GUICtrlSetBkColor($cpass2, $White)

GUICtrlSetColor($cpass3, $Black)

GUICtrlSetBkColor($cpass3, $White)

GUICtrlSetColor($cpass4, $Black)

GUICtrlSetBkColor($cpass4, $White)

GUICtrlSetColor($user5, $Black)

GUICtrlSetBkColor($user5, $White)

GUICtrlSetColor($user6, $Black)

GUICtrlSetBkColor($user6, $White)

GUICtrlSetColor($user7, $Black)

GUICtrlSetBkColor($user7, $White)

GUICtrlSetColor($user8, $Black)

GUICtrlSetBkColor($user8, $White)

GUICtrlSetColor($user9, $Black)

GUICtrlSetBkColor($user9, $White)

GUICtrlSetColor($pass5, $Black)

GUICtrlSetBkColor($pass5, $White)

GUICtrlSetColor($pass6, $Black)

GUICtrlSetBkColor($pass6, $White)

GUICtrlSetColor($pass7, $Black)

GUICtrlSetBkColor($pass7, $White)

GUICtrlSetColor($pass8, $Black)

GUICtrlSetBkColor($pass8, $White)

GUICtrlSetColor($pass9, $Black)

GUICtrlSetBkColor($pass9, $White)

GUICtrlSetColor($cpass5, $Black)

GUICtrlSetBkColor($cpass5, $White)

GUICtrlSetColor($cpass6, $Black)

GUICtrlSetBkColor($cpass6, $White)

GUICtrlSetColor($cpass7, $Black)

GUICtrlSetBkColor($cpass7, $White)

GUICtrlSetColor($cpass8, $Black)

GUICtrlSetBkColor($cpass8, $White)

GUICtrlSetColor($cpass9, $Black)

GUICtrlSetBkColor($cpass9, $White)

ElseIf ControlGetFocus("Local Windows Account Management") = "Edit6" Then

GUICtrlSetColor($user0, $Black)

GUICtrlSetBkColor($user0, $White)

GUICtrlSetColor($user1, $Black)

GUICtrlSetBkColor($user1, $White)

GUICtrlSetColor($user2, $Black)

GUICtrlSetBkColor($user2, $White)

GUICtrlSetColor($user3, $Black)

GUICtrlSetBkColor($user3, $White)

GUICtrlSetColor($user4, $Black)

GUICtrlSetBkColor($user4, $White)

GUICtrlSetColor($pass0, $Black)

GUICtrlSetBkColor($pass0, $White)

GUICtrlSetColor($pass1, $Black)

GUICtrlSetBkColor($pass1, $White)

GUICtrlSetColor($pass2, $Black)

GUICtrlSetBkColor($pass2, $White)

GUICtrlSetColor($pass3, $Black)

GUICtrlSetBkColor($pass3, $White)

GUICtrlSetColor($pass4, $Black)

GUICtrlSetBkColor($pass4, $White)

GUICtrlSetColor($cpass0, $Black)

GUICtrlSetBkColor($cpass0, $White)

GUICtrlSetColor($cpass1, $Black)

GUICtrlSetBkColor($cpass1, $azure2)

GUICtrlSetColor($cpass2, $Black)

GUICtrlSetBkColor($cpass2, $White)

GUICtrlSetColor($cpass3, $Black)

GUICtrlSetBkColor($cpass3, $White)

GUICtrlSetColor($cpass4, $Black)

GUICtrlSetBkColor($cpass4, $White)

GUICtrlSetColor($user5, $Black)

GUICtrlSetBkColor($user5, $White)

GUICtrlSetColor($user6, $Black)

GUICtrlSetBkColor($user6, $White)

GUICtrlSetColor($user7, $Black)

GUICtrlSetBkColor($user7, $White)

GUICtrlSetColor($user8, $Black)

GUICtrlSetBkColor($user8, $White)

GUICtrlSetColor($user9, $Black)

GUICtrlSetBkColor($user9, $White)

GUICtrlSetColor($pass5, $Black)

GUICtrlSetBkColor($pass5, $White)

GUICtrlSetColor($pass6, $Black)

GUICtrlSetBkColor($pass6, $White)

GUICtrlSetColor($pass7, $Black)

GUICtrlSetBkColor($pass7, $White)

GUICtrlSetColor($pass8, $Black)

GUICtrlSetBkColor($pass8, $White)

GUICtrlSetColor($pass9, $Black)

GUICtrlSetBkColor($pass9, $White)

GUICtrlSetColor($cpass5, $Black)

GUICtrlSetBkColor($cpass5, $White)

GUICtrlSetColor($cpass6, $Black)

GUICtrlSetBkColor($cpass6, $White)

GUICtrlSetColor($cpass7, $Black)

GUICtrlSetBkColor($cpass7, $White)

GUICtrlSetColor($cpass8, $Black)

GUICtrlSetBkColor($cpass8, $White)

GUICtrlSetColor($cpass9, $Black)

GUICtrlSetBkColor($cpass9, $White)

ElseIf ControlGetFocus("Local Windows Account Management") = "Edit7" Then

GUICtrlSetColor($user0, $Black)

GUICtrlSetBkColor($user0, $White)

GUICtrlSetColor($user1, $Black)

GUICtrlSetBkColor($user1, $White)

GUICtrlSetColor($user2, $Black)

GUICtrlSetBkColor($user2, $azure2)

GUICtrlSetColor($user3, $Black)

GUICtrlSetBkColor($user3, $White)

GUICtrlSetColor($user4, $Black)

GUICtrlSetBkColor($user4, $White)

GUICtrlSetColor($pass0, $Black)

GUICtrlSetBkColor($pass0, $White)

GUICtrlSetColor($pass1, $Black)

GUICtrlSetBkColor($pass1, $White)

GUICtrlSetColor($pass2, $Black)

GUICtrlSetBkColor($pass2, $White)

GUICtrlSetColor($pass3, $Black)

GUICtrlSetBkColor($pass3, $White)

GUICtrlSetColor($pass4, $Black)

GUICtrlSetBkColor($pass4, $White)

GUICtrlSetColor($cpass0, $Black)

GUICtrlSetBkColor($cpass0, $White)

GUICtrlSetColor($cpass1, $Black)

GUICtrlSetBkColor($cpass1, $White)

GUICtrlSetColor($cpass2, $Black)

GUICtrlSetBkColor($cpass2, $White)

GUICtrlSetColor($cpass3, $Black)

GUICtrlSetBkColor($cpass3, $White)

GUICtrlSetColor($cpass4, $Black)

GUICtrlSetBkColor($cpass4, $White)

GUICtrlSetColor($user5, $Black)

GUICtrlSetBkColor($user5, $White)

GUICtrlSetColor($user6, $Black)

GUICtrlSetBkColor($user6, $White)

GUICtrlSetColor($user7, $Black)

GUICtrlSetBkColor($user7, $White)

GUICtrlSetColor($user8, $Black)

GUICtrlSetBkColor($user8, $White)

GUICtrlSetColor($user9, $Black)

GUICtrlSetBkColor($user9, $White)

GUICtrlSetColor($pass5, $Black)

GUICtrlSetBkColor($pass5, $White)

GUICtrlSetColor($pass6, $Black)

GUICtrlSetBkColor($pass6, $White)

GUICtrlSetColor($pass7, $Black)

GUICtrlSetBkColor($pass7, $White)

GUICtrlSetColor($pass8, $Black)

GUICtrlSetBkColor($pass8, $White)

GUICtrlSetColor($pass9, $Black)

GUICtrlSetBkColor($pass9, $White)

GUICtrlSetColor($cpass5, $Black)

GUICtrlSetBkColor($cpass5, $White)

GUICtrlSetColor($cpass6, $Black)

GUICtrlSetBkColor($cpass6, $White)

GUICtrlSetColor($cpass7, $Black)

GUICtrlSetBkColor($cpass7, $White)

GUICtrlSetColor($cpass8, $Black)

GUICtrlSetBkColor($cpass8, $White)

GUICtrlSetColor($cpass9, $Black)

GUICtrlSetBkColor($cpass9, $White)

ElseIf ControlGetFocus("Local Windows Account Management") = "Edit8" Then

GUICtrlSetColor($user0, $Black)

GUICtrlSetBkColor($user0, $White)

GUICtrlSetColor($user1, $Black)

GUICtrlSetBkColor($user1, $White)

GUICtrlSetColor($user2, $Black)

GUICtrlSetBkColor($user2, $White)

GUICtrlSetColor($user3, $Black)

GUICtrlSetBkColor($user3, $White)

GUICtrlSetColor($user4, $Black)

GUICtrlSetBkColor($user4, $White)

GUICtrlSetColor($pass0, $Black)

GUICtrlSetBkColor($pass0, $White)

GUICtrlSetColor($pass1, $Black)

GUICtrlSetBkColor($pass1, $White)

GUICtrlSetColor($pass2, $Black)

GUICtrlSetBkColor($pass2, $azure2)

GUICtrlSetColor($pass3, $Black)

GUICtrlSetBkColor($pass3, $White)

GUICtrlSetColor($pass4, $Black)

GUICtrlSetBkColor($pass4, $White)

GUICtrlSetColor($cpass0, $Black)

GUICtrlSetBkColor($cpass0, $White)

GUICtrlSetColor($cpass1, $Black)

GUICtrlSetBkColor($cpass1, $White)

GUICtrlSetColor($cpass2, $Black)

GUICtrlSetBkColor($cpass2, $White)

GUICtrlSetColor($cpass3, $Black)

GUICtrlSetBkColor($cpass3, $White)

GUICtrlSetColor($cpass4, $Black)

GUICtrlSetBkColor($cpass4, $White)

GUICtrlSetColor($user5, $Black)

GUICtrlSetBkColor($user5, $White)

GUICtrlSetColor($user6, $Black)

GUICtrlSetBkColor($user6, $White)

GUICtrlSetColor($user7, $Black)

GUICtrlSetBkColor($user7, $White)

GUICtrlSetColor($user8, $Black)

GUICtrlSetBkColor($user8, $White)

GUICtrlSetColor($user9, $Black)

GUICtrlSetBkColor($user9, $White)

GUICtrlSetColor($pass5, $Black)

GUICtrlSetBkColor($pass5, $White)

GUICtrlSetColor($pass6, $Black)

GUICtrlSetBkColor($pass6, $White)

GUICtrlSetColor($pass7, $Black)

GUICtrlSetBkColor($pass7, $White)

GUICtrlSetColor($pass8, $Black)

GUICtrlSetBkColor($pass8, $White)

GUICtrlSetColor($pass9, $Black)

GUICtrlSetBkColor($pass9, $White)

GUICtrlSetColor($cpass5, $Black)

GUICtrlSetBkColor($cpass5, $White)

GUICtrlSetColor($cpass6, $Black)

GUICtrlSetBkColor($cpass6, $White)

GUICtrlSetColor($cpass7, $Black)

GUICtrlSetBkColor($cpass7, $White)

GUICtrlSetColor($cpass8, $Black)

GUICtrlSetBkColor($cpass8, $White)

GUICtrlSetColor($cpass9, $Black)

GUICtrlSetBkColor($cpass9, $White)

ElseIf ControlGetFocus("Local Windows Account Management") = "Edit9" Then

GUICtrlSetColor($user0, $Black)

GUICtrlSetBkColor($user0, $White)

GUICtrlSetColor($user1, $Black)

GUICtrlSetBkColor($user1, $White)

GUICtrlSetColor($user2, $Black)

GUICtrlSetBkColor($user2, $White)

GUICtrlSetColor($user3, $Black)

GUICtrlSetBkColor($user3, $White)

GUICtrlSetColor($user4, $Black)

GUICtrlSetBkColor($user4, $White)

GUICtrlSetColor($pass0, $Black)

GUICtrlSetBkColor($pass0, $White)

GUICtrlSetColor($pass1, $Black)

GUICtrlSetBkColor($pass1, $White)

GUICtrlSetColor($pass2, $Black)

GUICtrlSetBkColor($pass2, $White)

GUICtrlSetColor($pass3, $Black)

GUICtrlSetBkColor($pass3, $White)

GUICtrlSetColor($pass4, $Black)

GUICtrlSetBkColor($pass4, $White)

GUICtrlSetColor($cpass0, $Black)

GUICtrlSetBkColor($cpass0, $White)

GUICtrlSetColor($cpass1, $Black)

GUICtrlSetBkColor($cpass1, $White)

GUICtrlSetColor($cpass2, $Black)

GUICtrlSetBkColor($cpass2, $azure2)

GUICtrlSetColor($cpass3, $Black)

GUICtrlSetBkColor($cpass3, $White)

GUICtrlSetColor($cpass4, $Black)

GUICtrlSetBkColor($cpass4, $White)

GUICtrlSetColor($user5, $Black)

GUICtrlSetBkColor($user5, $White)

GUICtrlSetColor($user6, $Black)

GUICtrlSetBkColor($user6, $White)

GUICtrlSetColor($user7, $Black)

GUICtrlSetBkColor($user7, $White)

GUICtrlSetColor($user8, $Black)

GUICtrlSetBkColor($user8, $White)

GUICtrlSetColor($user9, $Black)

GUICtrlSetBkColor($user9, $White)

GUICtrlSetColor($pass5, $Black)

GUICtrlSetBkColor($pass5, $White)

GUICtrlSetColor($pass6, $Black)

GUICtrlSetBkColor($pass6, $White)

GUICtrlSetColor($pass7, $Black)

GUICtrlSetBkColor($pass7, $White)

GUICtrlSetColor($pass8, $Black)

GUICtrlSetBkColor($pass8, $White)

GUICtrlSetColor($pass9, $Black)

GUICtrlSetBkColor($pass9, $White)

GUICtrlSetColor($cpass5, $Black)

GUICtrlSetBkColor($cpass5, $White)

GUICtrlSetColor($cpass6, $Black)

GUICtrlSetBkColor($cpass6, $White)

GUICtrlSetColor($cpass7, $Black)

GUICtrlSetBkColor($cpass7, $White)

GUICtrlSetColor($cpass8, $Black)

GUICtrlSetBkColor($cpass8, $White)

GUICtrlSetColor($cpass9, $Black)

GUICtrlSetBkColor($cpass9, $White)

ElseIf ControlGetFocus("Local Windows Account Management") = "Edit10" Then

GUICtrlSetColor($user0, $Black)

GUICtrlSetBkColor($user0, $White)

GUICtrlSetColor($user1, $Black)

GUICtrlSetBkColor($user1, $White)

GUICtrlSetColor($user2, $Black)

GUICtrlSetBkColor($user2, $White)

GUICtrlSetColor($user3, $Black)

GUICtrlSetBkColor($user3, $azure2)

GUICtrlSetColor($user4, $Black)

GUICtrlSetBkColor($user4, $White)

GUICtrlSetColor($pass0, $Black)

GUICtrlSetBkColor($pass0, $White)

GUICtrlSetColor($pass1, $Black)

GUICtrlSetBkColor($pass1, $White)

GUICtrlSetColor($pass2, $Black)

GUICtrlSetBkColor($pass2, $White)

GUICtrlSetColor($pass3, $Black)

GUICtrlSetBkColor($pass3, $White)

GUICtrlSetColor($pass4, $Black)

GUICtrlSetBkColor($pass4, $White)

GUICtrlSetColor($cpass0, $Black)

GUICtrlSetBkColor($cpass0, $White)

GUICtrlSetColor($cpass1, $Black)

GUICtrlSetBkColor($cpass1, $White)

GUICtrlSetColor($cpass2, $Black)

GUICtrlSetBkColor($cpass2, $White)

GUICtrlSetColor($cpass3, $Black)

GUICtrlSetBkColor($cpass3, $White)

GUICtrlSetColor($cpass4, $Black)

GUICtrlSetBkColor($cpass4, $White)

GUICtrlSetColor($user5, $Black)

GUICtrlSetBkColor($user5, $White)

GUICtrlSetColor($user6, $Black)

GUICtrlSetBkColor($user6, $White)

GUICtrlSetColor($user7, $Black)

GUICtrlSetBkColor($user7, $White)

GUICtrlSetColor($user8, $Black)

GUICtrlSetBkColor($user8, $White)

GUICtrlSetColor($user9, $Black)

GUICtrlSetBkColor($user9, $White)

GUICtrlSetColor($pass5, $Black)

GUICtrlSetBkColor($pass5, $White)

GUICtrlSetColor($pass6, $Black)

GUICtrlSetBkColor($pass6, $White)

GUICtrlSetColor($pass7, $Black)

GUICtrlSetBkColor($pass7, $White)

GUICtrlSetColor($pass8, $Black)

GUICtrlSetBkColor($pass8, $White)

GUICtrlSetColor($pass9, $Black)

GUICtrlSetBkColor($pass9, $White)

GUICtrlSetColor($cpass5, $Black)

GUICtrlSetBkColor($cpass5, $White)

GUICtrlSetColor($cpass6, $Black)

GUICtrlSetBkColor($cpass6, $White)

GUICtrlSetColor($cpass7, $Black)

GUICtrlSetBkColor($cpass7, $White)

GUICtrlSetColor($cpass8, $Black)

GUICtrlSetBkColor($cpass8, $White)

GUICtrlSetColor($cpass9, $Black)

GUICtrlSetBkColor($cpass9, $White)

ElseIf ControlGetFocus("Local Windows Account Management") = "Edit11" Then

GUICtrlSetColor($user0, $Black)

GUICtrlSetBkColor($user0, $White)

GUICtrlSetColor($user1, $Black)

GUICtrlSetBkColor($user1, $White)

GUICtrlSetColor($user2, $Black)

GUICtrlSetBkColor($user2, $White)

GUICtrlSetColor($user3, $Black)

GUICtrlSetBkColor($user3, $White)

GUICtrlSetColor($user4, $Black)

GUICtrlSetBkColor($user4, $White)

GUICtrlSetColor($pass0, $Black)

GUICtrlSetBkColor($pass0, $White)

GUICtrlSetColor($pass1, $Black)

GUICtrlSetBkColor($pass1, $White)

GUICtrlSetColor($pass2, $Black)

GUICtrlSetBkColor($pass2, $White)

GUICtrlSetColor($pass3, $Black)

GUICtrlSetBkColor($pass3, $azure2)

GUICtrlSetColor($pass4, $Black)

GUICtrlSetBkColor($pass4, $White)

GUICtrlSetColor($cpass0, $Black)

GUICtrlSetBkColor($cpass0, $White)

GUICtrlSetColor($cpass1, $Black)

GUICtrlSetBkColor($cpass1, $White)

GUICtrlSetColor($cpass2, $Black)

GUICtrlSetBkColor($cpass2, $White)

GUICtrlSetColor($cpass3, $Black)

GUICtrlSetBkColor($cpass3, $White)

GUICtrlSetColor($cpass4, $Black)

GUICtrlSetBkColor($cpass4, $White)

GUICtrlSetColor($user5, $Black)

GUICtrlSetBkColor($user5, $White)

GUICtrlSetColor($user6, $Black)

GUICtrlSetBkColor($user6, $White)

GUICtrlSetColor($user7, $Black)

GUICtrlSetBkColor($user7, $White)

GUICtrlSetColor($user8, $Black)

GUICtrlSetBkColor($user8, $White)

GUICtrlSetColor($user9, $Black)

GUICtrlSetBkColor($user9, $White)

GUICtrlSetColor($pass5, $Black)

GUICtrlSetBkColor($pass5, $White)

GU

Edited by Kaso

Share this post


Link to post
Share on other sites



Check out for loops and the Eval() function, you'll save yourself alot of time and coding.

Share this post


Link to post
Share on other sites

Check out for loops and the Eval() function, you'll save yourself alot of time and coding.

yeah it is nice and long. thanks for the tips. i'll keep that in mind.

Share this post


Link to post
Share on other sites

could you attach the file as a zip? it looks like it is missing some code at the bottom.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0