Page 1 of 1 1
Topic Options
#199873 - 2010-09-14 09:09 PM Net Local Group
Tesdall Offline
Getting the hang of it

Registered: 2009-10-02
Posts: 78
Loc: USA
Im converting a batch file over to kix and the command i have is to setup a new groups in the users/groups area. In the batch file i use:
 Code:
net localgroup administrators "domain\group" /add


but i don't seem to be able to find a code that "matches" it.

Point in the right direction?

i've searched around the message boads but cannot seem to find anything.

i've tried a few things:
 Code:
shell net localgroup administrators ""domain\group"" /add
run "%comspec% net localgroup administrators "domain\group"" /add

and multi variants of "'s and 's in different places. I have had it list everyone in the ADMIN group but no luck on actually adding the group.
_________________________
Where ever you go, there you are.

Top
#199874 - 2010-09-14 09:12 PM Re: Net Local Group [Re: Tesdall]
Tesdall Offline
Getting the hang of it

Registered: 2009-10-02
Posts: 78
Loc: USA
 Code:
shell "net localgroup Administrators domain\group /Add"


works when logged on as a local or domain admin.
_________________________
Where ever you go, there you are.

Top
#199875 - 2010-09-14 09:23 PM Re: Net Local Group [Re: Tesdall]
Tesdall Offline
Getting the hang of it

Registered: 2009-10-02
Posts: 78
Loc: USA
Im running into an issue no that i could use some help with.

 Code:
shell "net localgroup Administrators domain\domain admins /Add"


it would apepar that it will not let me do user groups with multiple names.

it would let me do the group IT but not the group DOMAIN ADMINS. If i wrap Domain admins in "",'', or "' it still will not let me do it.

Any ideas?
_________________________
Where ever you go, there you are.

Top
#199876 - 2010-09-14 09:26 PM Re: Net Local Group [Re: Tesdall]
Tesdall Offline
Getting the hang of it

Registered: 2009-10-02
Posts: 78
Loc: USA
 Code:
shell 'net localgroup Administrators "domain\domain admins" /Add'


works


Edited by Tesdall (2010-09-14 09:52 PM)
_________________________
Where ever you go, there you are.

Top
#199877 - 2010-09-14 09:43 PM Re: Net Local Group [Re: Tesdall]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
Glad we could telepathically help!

Best practice for SHELL/RUN is to use single quotes for Kix strings and double-quotes for the command strings. Kix doesn't really care, but most command-line tools do, and insist on the doubles.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 507 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.083 seconds in which 0.04 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org