Solved

Script or batch to create Windows user

Posted on 2014-12-13
2
203 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
2 Comments
 
LVL 68

Accepted Solution

by:
Qlemo earned 500 total points
Comment Utility
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
Comment Utility
Perfect!
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

When you receive another warning that your shared drive is almost full and you have asked your users to clean out old files again and again, here is a single command that may help. This command will place all the files that have not been used rec…
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
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 fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now