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   [ - ] Hide 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
  • very good
  • 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.
    • Maybe try "runas /user:computer\administrator CMD"
Please log in to comment

Answer this question or Comment on this question for clarity


This content is currently hidden from public view.
Reason: Removed by member request
For more information, visit our FAQ's.


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.

Answered 04/09/2014 by: dedenker
Third Degree Black Belt

Please log in to comment

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".


Answered 04/09/2014 by: anwar.mahmood@outlook.com
White Belt

Please log in to comment
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja