Jump to content

Recommended Posts

Posted

Hi

I would like to add a user to local group in XP

I can use run net command to add users , but I can't add that user to local group in XP. Net command not work that way

Can I do that with Autoit ? if it can , example is Appreciated.

Thanks in advance

Posted

@david7411

Maybe this can get you started.

$strGroupName = "<GroupName>" ; e.g. Administrators
$strUserName = "<UserName>" ; e.g. SecretUser
$strComputer = "<ComputerName>"


$objGroup = ObjGet("WinNT://" & $strComputer & "/" & $strGroupName)
$objGroup.Add("WinNT://" & $strComputer & "/" & $strUserName)

ConsoleWrite ("Done")

regards,

ptrex

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
×
×
  • Create New...