?
Solved

Script or batch to create Windows user

Posted on 2014-12-13
2
Medium Priority
?
232 Views
Last Modified: 2014-12-28
I need to auto create a new Windows 7/2003/2008 user account that is a local admin but that is hidden from the user login screen.  I would like the username to be backup_imager and the password to be something complex that I can tweak within the script or batch.  I want to be able to run this on the local computer and it create the new user account, add it to the administrators group and then hide it.
0
Comment
Question by:murryc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 70

Accepted Solution

by:
Qlemo earned 2000 total points
ID: 40498032
To hide users from the logon screen, they need to appear in
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList as a DWord value set to 0. So in a cmd batch:
@echo off
net user  backup_imager SomethingComplexThatICanTweak /add
net localgroup administrators backup_imager /add
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList" /v backup_imager /t REG_DWord /d 0

Open in new window

This script does not perform any error handling, so applying it twice will result in some messages.
0
 

Author Comment

by:murryc
ID: 40520450
Perfect!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoHotkey is an excellent, free, open source programming/scripting language for Windows. It started out as a keyboard/mouse macros product, but has expanded into a robust language. This article provides an introduction to it, with links to addition…
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question