• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 305
  • Last Modified:

Create a User

How do you create anew user on an xp or 2000 computer.
Can you assisgn them to a group
0
Eamon
Asked:
Eamon
  • 3
1 Solution
 
TooKoolKrisCommented:
Use this ina (.vbs) file. Of course change the variables to your needs.

strComputer = "MyComputer"
Set colAccounts = GetObject("WinNT://" & strComputer & ",computer")
Set objUser = colAccounts.Create("user", "Admin2")
objUser.SetPassword "sA2xpWh"
objUser.SetInfo

0
 
TooKoolKrisCommented:
This one will add the user to a group as well.

strComputer = "MyComputer"
Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators,group")
Set objUser = GetObject("WinNT://" & strComputer & "/kenmyer,user")
objGroup.Add(objUser.ADsPath)

0
 
EamonAuthor Commented:
Perfect

Thank You TooKoolKris
0
 
TooKoolKrisCommented:
Your Welcome
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now