Solved

Script or batch to create Windows user

Posted on 2014-12-13
2
212 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 500 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

728 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