AppTux Posted February 28, 2010 Posted February 28, 2010 I want to make a program to add or remove users. Is it possible to read all the users from the computer and set it in a combo? PowerSlide2UnlockiPhone look-a-like program you can use to lock your pc, you can't access your desktop again until the password is entered and the slider slided to the right. (really proud of it)-- After a time AutoIt and Windows, I switched to Mac. Don't expect me to answer anymore.
Fire Posted February 28, 2010 Posted February 28, 2010 (edited) Hi, Yes this can be done in AutoitScript. Some idea for you. RunWait("cmd.exe /c " & "wmic useraccount get Name>>"&@TempDir&"\localusers.ini",@ScriptDir,@SW_HIDE) MsgBox(64,"",FileRead(@TempDir&"\localusers.ini")) + for add users to localgroups or delete you can use standart windows net user /? and use it with run() I believe you can find more new ideas for self. Edited February 28, 2010 by Sh3llC043r [size="5"] [/size]
Developers Jos Posted February 28, 2010 Developers Posted February 28, 2010 $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") ; Install a custom error handler Local $objDomain = ObjGet("WinNT://" & @ComputerName & "" ) Dim $filter[2] = ["user"] $objDomain.Filter = $filter For $aUser In $objDomain ConsoleWrite($aUSer.Name & "|" & $aUSer.Description & @LF) Next ;COM Error function Func ComError() If IsObj($oMyError) Then $HexNumber = Hex($oMyError.number, 8) ConsoleWrite($oMyError.scriptline & ' $HexNumber = ' & $HexNumber & "Windescription is: " & $oMyError.description & "|" & $oMyError.windescription & @lf) ;### Debug Console SetError($HexNumber) Else SetError(1) EndIf Return 0 EndFunc ;==>ComError 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.
AppTux Posted March 1, 2010 Author Posted March 1, 2010 thank you very much. this was very helpful! PowerSlide2UnlockiPhone look-a-like program you can use to lock your pc, you can't access your desktop again until the password is entered and the slider slided to the right. (really proud of it)-- After a time AutoIt and Windows, I switched to Mac. Don't expect me to answer anymore.
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