Registry setting for making users local administrators

J.R. Sitman
J.R. Sitman used Ask the Experts™
on
What is the registry setting that automatically makes each user a local administrator when they log on to a Win 7 computer?   I set it years ago and can't remember.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
End-user support
Commented:
Correct me if I'm wrong but... I don't think there is a registry setting. But, as the domain or local admin, you can run net localgroup "administrators" "MemberName" /add

If you have a bunch of users, you can use psexec:

@echo off
for /f "tokens=1-2 delims==" %%a in (compusers.txt) do (
  ECHO psexec \\%%a net localgroup administrators "domain\%%b" /add
)

Open in new window

J.R. SitmanIT Director

Author

Commented:
I just found out you are correct.  Thanks
NVITEnd-user support

Commented:
Hi jrsitman...

BTW, here's the contents of compusers.txt. This adds userA and userB as admins to comp1. It also adds userB to comp2:
comp1=userA
comp1=userB
comp2=userB

Open in new window


Also, in the prior .bat code, remove the ECHO prefixing psexec to run it for real.
J.R. SitmanIT Director

Author

Commented:
thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial