/build/static/layout/Breadcrumb_cap_w.png

Scripting Question


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

04/07/2014 9807 views

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

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"

All Answers

This content is currently hidden from public view.
Reason: Removed by member request For more information, visit our FAQ's.
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.

Answered 04/09/2014 by: dedenker
3rd Degree Black 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

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

 
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