Sign in to follow this  
Followers 0
wolkenloser

Add a Windows User to a local Group

6 posts in this topic

Hi all,

It should create an Windowsaccount on a XP and take it to a prefixt group.

First I try it with a batch file like this:

"net user test test /ADD"

this is simple and its working well.

But there is no way to add the test User into a localgroup e.g. Administartors oder Mainusers...

Has someone an Idea fpr me to do this simple with autoit ?

regards

Wolke

Share this post


Link to post
Share on other sites



But there is no way to add the test User into a localgroup e.g. Administartors oder Mainusers...

Try net localgroup accounts add/? from command prompt


Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size]

Share this post


Link to post
Share on other sites

Try net localgroup accounts add/? from command prompt

Ok, so I can add a Group, but I want to add a member to an existing group

Share this post


Link to post
Share on other sites

Ok, so I can add a Group, but I want to add a member to an existing group

Hi,

I found a Tool named addgrpmem.exe.

It works :-)

Thanks,

Wolke

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Ok, so I can add a Group, but I want to add a member to an existing group

That's exactly what the net localgroup command does...

net localgroup <group> <user> /add

<group> would be the group you want to add <user> to.

for example, adding a user called Test, and then adding him to the group Administrators(assuming you're using an English version of windows):

net user Test /add
net localgroup Administrators Test /add
Edited by FreeFry

Share this post


Link to post
Share on other sites

That's exactly what the net localgroup command does...

net localgroup <group> <user> /add

<group> would be the group you want to add <user> to.

for example, adding a user called Test, and then adding him to the group Administrators(assuming you're using an English version of windows):

net user Test /add
net localgroup Administrators Test /add
Thanks, it works.

I don´t understand the helpfile of NET LOCALGROUP

greetings Wolke

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0