I need to complete my script to put a Global Domain Group (Domain Users) to a local Group (Power Users) which is after a new Installation not like this. Need Power User Rights on the Clients to get Burning SW on Clients Working.
I tried like this but this script is only working with Users to Local Groups and not Groups to Local Groups
shell net localgroup "Power Users" "glion\Domain Users" /add
#43207 - 2003-07-2303:12 PMRe: Add Domain group to a local Group
AnonymousAnonymous
Unregistered
What are you gonna do about permissions? Do all your users have the rights to add domain groups to local groups? I ran into this before so I wrote a .bat file with my net localgroup command in it, converted it to a .COM file, created a generic domain account with Domain Admin rights, wrote a .KIX file to use the SU command to run the COM file as that Domain Admin account then used Kixcrypt to encrypt the .KIX file so the password wouldn't be in clear text. Does this sound like something you're interested in?
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
What is the error code that is returned if you use the function I posted above? You may have to write it to a log file if you do not have visiblity to the script execution.
[ 24. July 2003, 17:56: Message edited by: Howard Bullock ]
#43213 - 2003-07-2407:17 PMRe: Add Domain group to a local Group
AnonymousAnonymous
Unregistered
Here's the script I use to check the local group to see if the see if the group has already been added to avoid error message if you try and add a user/group that already belongs to the local group. If the domain account/group doesn't exist, it adds it. I know this doesn't answer your question about your error, but it might help you out in other ways.
code:
IF "@PRODUCTTYPE" = "Windows 2000 Professional" SHELL "COMMAND.COM /E:1024 /C net localgroup Administrators > c:\Admins.txt" OPEN (1,C:\ADMINS.TXT,2)
:READAGAIN
$X = READLINE (1)
IF INSTR ("$X", "Domain\Domain Admins") GOTO END ENDIF
IF INSTR ("$X", "The Command") RUN I:\SCRIPTS\BIOPOWER1.EXE GOTO END ENDIF