/build/static/layout/Breadcrumb_cap_w.png

Adding Domain Groups to Local Administrator Post-Installation Task Windows 7 x64 Enterprise

I'm trying to add three of our domain groups to the list of local administrators as a Post-Installation task for our K2000 Win7 x64 Enterprise build. Currently, the task loops when adding the first group and does not add the rest. This is what I currently have:

net localgroup "Administrators" "ourcollege.edu\Group1" /ADD 

net localgroup "Administrators" "ourcollege.edu\Group2" /ADD 

net localgroup "Administrators" "ourcollege.edu\Group3" /ADD 

 

Any/all help is greatly appreciated - thanks!


3 Comments   [ + ] Show comments
  • try it without the quotes. I also use start /wait so they do not step on each other, but still on 3.5, just starting to test 3.6

    start /wait net localgroup Administrators ourcollege.edu\Group3 /ADD - SMal.tmcc 10 years ago
  • very good - brunocardoso 10 years ago
  • What's strange is I can run this perfectly fine by right clicking and selecting run as administrator but when I add

    runas /user:administrator CMD

    it still loops adding the first group and does not add it. - SHRIVES93 10 years ago
    • Maybe try "runas /user:computer\administrator CMD" - nheyne 10 years ago

Answers (2)

Posted by: dedenker 10 years ago
3rd Degree Black Belt
0

I am no expert with K2000 deployment, but if you can set some scripts:

REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce /v addgroup /t REG_SZ /d "net ocalgroup \"Administrators\" \"ourcollege.edu\Group1\" /ADD "

Please note to excape the "quot" within the line.
This command will run that command at start up, once.

Posted by: anwar.mahmood@outlook.com 10 years ago
White Belt
0

I'm not sure that the "NET" command supports domain DNS names.  It certainly works with short domain names (in your example, perhaps the short domain name is "ourcollege".

Anwar

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ