Solved

Script to create XP or 2000 user account and disable XP firewall

Posted on 2009-05-19
4
312 Views
Last Modified: 2012-05-07
I have a network backup program that I need to run on non-domain network computers.  With this arrangement, I have to create a common admin user account on each peer-to-peer workstation so that the network backup utility can access each computer.  I also have to disable the firewall on the XP workstations.  I am wanting a script solution, I can run locally on each computer, that will create a new user account with the username snapshot_admin and the password $nap$hot1234.  It needs to create the account on either 2000 or XP machines.  On XP, it needs to configure the user account NOT to show on the welcome screen, just like the default administrator account (not sure how that works).  The script then needs to turn off and disable the XP firewall, if the script is running on a local XP machine.

I am looking for a turn-key script solution.  Thanks for the help Experts!
0
Comment
Question by:murryc
  • 2
  • 2
4 Comments
 
LVL 38

Accepted Solution

by:
Shift-3 earned 500 total points
ID: 24423104
Paste the script below into a text file with a .cmd extension.  Running it will create the account, add it to the local Administrators group, hide it on the Welcome Screen, and disable the Windows Firewall.


@echo off

setlocal
 

set user=snapshot_admin

set pw=$nap$hot1234

set key=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList
 

net user %user% %pw% /ADD > NUL 2>&1

net localgroup administrators %user% /ADD > NUL 2>&1
 

reg add "%key%" /v %user% /t REG_DWORD /d 0 /f > NUL 2>&1
 

sc stop sharedaccess > NUL 2>&1

sc config sharedaccess start= disabled > NUL 2>&1

Open in new window

0
 

Author Comment

by:murryc
ID: 24423276
Easy enough!
0
 

Author Comment

by:murryc
ID: 24425180
Shift-3,

Can you add to the script for it to create a folder named snapshot on the root of c:\?

c:\snapshot
0
 
LVL 38

Expert Comment

by:Shift-3
ID: 24427608
Add the line

if not exist c:\snapshot md c:\snapshot

Open in new window

0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Exit Loop after User Input 4 41
Scraping specific data within an XML document 19 54
Windows XP - Change Motherboard CPU and RAM infinite restart 19 97
Problem to With line 4 39
This script will sweep a range of IP addresses (class c only, 255.255.255.0) and report to a log the version of office installed. What it does: 1.)      Creates log file in the directory the script is run from (if it doesn't already exist) 2.)      Sweep…
We have adopted the strategy to use Computers in Student Labs as the bulletin boards. The same target can be achieved by using a Login Notice feature in Group policy but it’s not as attractive as graphical wallpapers with message which grabs the att…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

911 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

25 Experts available now in Live!

Get 1:1 Help Now