10031992 Posted April 21, 2010 Share Posted April 21, 2010 I am redoing an old script, which creates a Windows user account. But now I do too showing the user accounts and passwords. I already have .. Show Accs Windows MsgBox(0x40,"Wait","Please wait to read all users",2) Local $colUsers, $sTmp, $Array[1] = ["user"] $colUsers = ObjGet("WinNT://" & @ComputerName) If IsObj($colUsers) Then $colUsers.Filter = $Array For $objUser In $colUsers $sTmp &= $objUser.Name & @LF Next EndIf MsgBox(0, "All Account Users (of Your Computer)", $sTmp) EndFunc Lack only showing the password ... (I do not know and it is possible to do, but give it a try) script is already so. I wanted to show the user name and password then soon .. my script alllll expandcollapse popup#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <array.au3> #include <GUIListBox.au3> #include <Inet.au3> #Region ### START Koda GUI section ### Form= Global $USERNAME,$PASSWORD, $GROUPNAME,$AUTOLOGON, $KEY, $Form2, $UsernameINPUT, $PassINPUT ; =====>>>>> MUST DECLARE Opt("guioneventmode", 1) Opt("TrayOnEventMode",1) Opt("TrayMenuMode",1) $Form1 = GUICreate("User Creator - by Bode", 328, 210, 192, 124) GUISetCursor (3) $nFileMenu = GUICtrlCreateMenu("File") $nHelpitem2 = GUICtrlCreateMenuItem("Help", $nFileMenu) GUICtrlSetOnEvent(-2, "help") $nAboutitem = GUICtrlCreateMenuItem("About", $nFileMenu) GUICtrlSetOnEvent(-3, "about") $Group1 = GUICtrlCreateGroup("", 8, 80, 313, 105) $Button1 = GUICtrlCreateButton("Make a Account", 32, 96, 107, 41, $WS_GROUP) $Button2 = GUICtrlCreateButton("Show Accounts", 192, 96, 107, 41, $WS_GROUP) $Label1 = GUICtrlCreateLabel("Ver:", 16, 160, 30, 17) GUICtrlSetFont(-1, 8, 800, 0, "Verdana") $Label2 = GUICtrlCreateLabel("1.2", 48, 160, 24, 17) GUICtrlSetFont(-1, 8, 800, 0, "Verdana") $Label3 = GUICtrlCreateLabel("Made by Bode", 248, 168, 68, 14) GUICtrlSetFont(-1, 6, 800, 0, "Verdana") GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlSetCursor (-1, 3) $listText = GUICtrlCreateList(" - Creator User Windows - Bode This software is free Thank you for using it by Bode @Caram ", 0, 1, 328, 40, 10) ; a label (change it to your name GUICtrlSetFont(-1, 17, 400, 2, "Impact"); GUISetOnEvent($GUI_EVENT_CLOSE, "onautoitexit") GUICtrlSetOnEvent($Button1, "Button1") GUICtrlSetOnEvent($Button2, "Button2") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 Sleep(50) $s_TempText = GUICtrlRead($listText) GUICtrlSetData($listText, "|" & StringTrimLeft($s_TempText, 1) & StringLeft($s_TempText, 1)) WEnd Func Button1() $Form2 = GUICreate("Make A Account - by Bode", 255, 137, 192, 124) $Group2 = GUICtrlCreateGroup("", 8, 8, 233, 121) $UsernameINPUT = GUICtrlCreateInput("", 104, 24, 129, 21) $PassINPUT = GUICtrlCreateInput("", 104, 64, 129, 21) $UsernameTXT = GUICtrlCreateLabel("Username:", 16, 24, 83, 20) GUICtrlSetFont(-1, 10, 800, 0, "Verdana") $PassTXT = GUICtrlCreateLabel("Password:", 16, 64, 79, 20) GUICtrlSetFont(-1, 10, 800, 0, "Verdana") $Opt = GUICtrlCreateLabel("(optional)",25,80,79,20) $BotaoCONFIRMAR = GUICtrlCreateButton("Confirm", 152, 96, 81, 25) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) GUICtrlSetOnEvent($BotaoCONFIRMAR, "BotaoCONFIRMAR") GUISetOnEvent($GUI_EVENT_CLOSE, "closed") EndFunc Func BotaoCONFIRMAR() $USERNAME = GUICtrlRead($UsernameINPUT) $PASSWORD = GUICtrlRead($PassINPUT) _CREATEAUSER() EndFunc ;;;; Func _CREATEAUSER() If Not FileExists(EnvGet("AllUsersProfile") & "\..\" & $USERNAME) Then RunWait(@ComSpec & " /c " & "Net User " & $USERNAME & " " & $PASSWORD & " /add &&" & "Net LocalGroup " & $GROUPNAME & " " & $USERNAME & " /add &" & "Net Accounts /MaxPwAge:UnLimited", "") If $AUTOLOGON Then $KEY = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" RegWrite($KEY, "DefaultUserName", "Reg_sz", $USERNAME) RegWrite($KEY, "DefaultPassword", "Reg_sz", $PASSWORD) RegWrite($KEY, "AutoAdminLogon", "Reg_sz", 1) EndIf EndIf GUIDelete($Form2) ; =====>>>>> TO CLOSE THE 2º GUI MsgBox(0,"Attention","If all went well your user account was successfully created. Thank you for using our software.","") ; =====>>>>> OPTIONAL EndFunc Func Button2() MsgBox(0x40,"Wait","Please wait to read all users",2) Local $colUsers, $sTmp, $Array[1] = ["user"] $colUsers = ObjGet("WinNT://" & @ComputerName) If IsObj($colUsers) Then $colUsers.Filter = $Array For $objUser In $colUsers $sTmp &= $objUser.Name & @LF Next EndIf MsgBox(0, "All Account Users (of Your Computer)", $sTmp) EndFunc ; mostrar func help() MsgBox(64,"How to use?","After opening the program, click (Make the Account) and create your account if you leave blank the fields with the registration process of user accounts will not be effected.") EndFunc Func about() MsgBox(0x40,"","Software Made by Bode (community AutoitBrasil) Thanks you for Test",20) EndFunc Func onautoitexit() Exit EndFunc Func closed() Exit EndFunc -------------------------------------------------------------------------------------------------------------------------------------------- [center][/center][center]Autoit Support Forum in Portuguese | AutoitBrasil.com[/center] [sub]My Script :[/sub]Simples Login for Program Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 21, 2010 Share Posted April 21, 2010 What do you mean by "show the password"? You are reading it from an input control ($PassINPUT) already. Show it to who, for what? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
10031992 Posted April 21, 2010 Author Share Posted April 21, 2010 (edited) I wanted this script.that shows the accounts of users,also shows the passwords of accounts that have passwords.MsgBox(0x40,"Wait","Please wait to read all users",2) Local $colUsers, $sTmp, $Array[1] = ["user"] $colUsers = ObjGet("WinNT://" & @ComputerName) If IsObj($colUsers) Then $colUsers.Filter = $Array For $objUser In $colUsers $sTmp &= $objUser.Name & @LF Next EndIf MsgBox(0, "All Account Users (of Your Computer)", $sTmp) EndFuncwhy is that?If the person to forget the password of account will show it too. Edited April 21, 2010 by 10031992 -------------------------------------------------------------------------------------------------------------------------------------------- [center][/center][center]Autoit Support Forum in Portuguese | AutoitBrasil.com[/center] [sub]My Script :[/sub]Simples Login for Program Link to comment Share on other sites More sharing options...
Developers Jos Posted April 21, 2010 Developers Share Posted April 21, 2010 I wanted this script. that shows the accounts of users,also shows the passwords of accounts that have passwords. MsgBox(0x40,"Wait","Please wait to read all users",2) Local $colUsers, $sTmp, $Array[1] = ["user"] $colUsers = ObjGet("WinNT://" & @ComputerName) If IsObj($colUsers) Then $colUsers.Filter = $Array For $objUser In $colUsers $sTmp &= $objUser.Name & @LF Next EndIf MsgBox(0, "All Account Users (of Your Computer)", $sTmp) EndFunc why is that? If the person to forget the password of account will show it too. Forget about it .. This is not possible and not needed. When people forget their password you reset it. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
10031992 Posted April 21, 2010 Author Share Posted April 21, 2010 OK Thank you .. For me to take this doubt, Prevented lost time Thnk to you two -------------------------------------------------------------------------------------------------------------------------------------------- [center][/center][center]Autoit Support Forum in Portuguese | AutoitBrasil.com[/center] [sub]My Script :[/sub]Simples Login for Program Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now