Kaso Posted November 3, 2005 Share Posted November 3, 2005 I was wondering if it was possible to list the local windows accounts say in an array. I am making a gui to reset the accounts all at the same time using the net user commands in command prompt. I want to make it as easy as possible for the person resetting. Heres the GUI currently. I don't need the help fitting it in the GUI just wondering if it is possible to have the accounts in an array so I can have each account show up in the input box automatically. The reason for this is using the net user commands are casesensitive so if a username is "Username" and you use "net user username newpassword" you'll get an error because the account is Username not username. SO having the usernames appear automatically eliminates this problem. making it as easy as possible. Any help would be appreciated. Thanks #include <GUIConstants.au3> GUICreate("Password Resets For Local Accounts") ; will create a dialog box that when displayed is centered GUISetState (@SW_SHOW) ; will display an empty dialog box ; UserNames GUICtrlCreateLabel("Username",17, 10) $user0 = GUICtrlCreateInput("",10,30,65) $user1 = GUICtrlCreateInput("",10,55,65) $user2 = GUICtrlCreateInput("",10,80,65) $user3 = GUICtrlCreateInput("",10,105,65) $user4 = GUICtrlCreateInput("",10,130,65) $user5 = GUICtrlCreateInput("",10,155,65) $user6 = GUICtrlCreateInput("",10,180,65) $user7 = GUICtrlCreateInput("",10,205,65) $user8 = GUICtrlCreateInput("",10,230,65) $user9 = GUICtrlCreateInput("",10,255,65) ; Passwords GUICtrlCreateLabel("Password",107, 10) $pass0 = GUICtrlCreateInput("",100,30,65) $pass1 = GUICtrlCreateInput("",100,55,65) $pass2 = GUICtrlCreateInput("",100,80,65) $pass3 = GUICtrlCreateInput("",100,105,65) $pass4 = GUICtrlCreateInput("",100,130,65) $pass5 = GUICtrlCreateInput("",100,155,65) $pass6 = GUICtrlCreateInput("",100,180,65) $pass7 = GUICtrlCreateInput("",100,205,65) $pass8 = GUICtrlCreateInput("",100,230,65) $pass9 = GUICtrlCreateInput("",100,255,65) ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Link to comment Share on other sites More sharing options...
Nuffilein805 Posted November 3, 2005 Share Posted November 3, 2005 (edited) $search = filefindfirstfile("c:\documents and settings\*") $a = 0 dim $name[200] do $a = $a + 1 $name[$a] = filefindnextfile ($search) until @error = 1 and $name[$a] = "" hope that helps you Edited November 3, 2005 by Nuffilein805 my little chatmy little encryption toolmy little hidermy unsafe clickbot Link to comment Share on other sites More sharing options...
Danny35d Posted November 3, 2005 Share Posted November 3, 2005 (edited) I create a function that will give you all the user accounts on the local computer or remote computer including domain accounts, it returns a 2 dimensional array one with Username and the other one with the SID account.Check this Post...May be you can modefied to get only the local accounts. Edited November 3, 2005 by Danny35d AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line 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