I have a VBS script to create a Local User and adds them to the Administrator Group. I am trying to convert that script to AutoIt. I will eventually make a GUI and make it look nice. I can't get it to work though.
Here is what I have so far.
#include <GUIConstants.au3>
; RETRIEVE Computer Name
Dim $objNetwork, $strComputerName
$objNetwork = ObjCreate("WScript.Network")
$strComputer = $objNetwork.ComputerName
$strUserName = ("testuser")
$strFullName = ("Test User")
$strPassword = (
Dude the answer was in the script above:
; Check if account exists .. if not create it
$objUser = ObjGet("WinNT://" & $strComputer & "/" & $UserName)
If @Error then
$colAccounts = ObjGet("WinNT://" & $strComputer & "")
$objUser = $colAccounts.Create("user", $UserName)
$objUser.SetPassword ($Password)
$objUser.Put ("Fullname", "Test User")
$objUser.Put ("Description", "Test User description")
$objUser.SetInfo
EndIf