Jump to content

Creating another user having admin preveliges


ashrafzia

Recommended Posts

I have created two users in my unattended setup the Administrator and Ashraf using the NET USER method. Works fine but the 2nd user (Ashraf) is an ordinary user and has a limited account. I want it to be administrator too. How to fix this ?

This is my useraccounts.cmd file:

net user "Ashraf Zia" 123456 /add
net localgroup Administrators Ashraf Zia /add
net accounts /maxpwage:unlimited
REGEDIT /S autologon.reg
EXIT

and autologon.reg file:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"DefaultUserName"="Ashraf Zia"
"DefaultPassword"="123456"
"AutoAdminLogon"="1"

Link to comment
Share on other sites


net localgroup Administrators Ashraf Zia /add

the username should probably be in quotes, otherwise "Zia" would be interpreted as another switch or command:

net localgroup Administrators "Ashraf Zia" /add

Edited by redxii
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...