Add Local Admin Account using Batch Script

Quick & dirty method to add a local administrator account on a Windows system using a batch file and hiding the login from the login screen in XP…

@echo off
: Add local administrator
: Revised January 22, 2010, RJK
:
: Further information: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/net_user.mspx?mfr=true
: And: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/net_user.mspx?mfr=true
: And: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/net_user.mspx?mfr=true
net user merlin sekretP4SS /add /passwordreq:yes /passwordchg:yes /fullname:"Merlin" /usercomment:"Local Admin"
net localgroup "administrators" "merlin" /add
net localgroup "users" "merlin" /delete
: Hide logon
reg add "hklmSoftwareMicrosoftWindows NTCurrentVersionWinlogonSpecialAccountsUserList" /v merlin /t REG_DWORD /d 0 /f

Published by

Rich

Just another IT guy.

Leave a Reply

Your email address will not be published. Required fields are marked *