Solved

Create a User

Posted on 2003-11-19
5
298 Views
Last Modified: 2010-05-01
How do you create anew user on an xp or 2000 computer.
Can you assisgn them to a group
0
Comment
Question by:Eamon
  • 3
5 Comments
 
LVL 9

Accepted Solution

by:
TooKoolKris earned 100 total points
ID: 9780415
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
 
LVL 9

Expert Comment

by:TooKoolKris
ID: 9780435
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
 
LVL 26

Expert Comment

by:EDDYKT
ID: 9780473
0
 
LVL 1

Author Comment

by:Eamon
ID: 9786658
Perfect

Thank You TooKoolKris
0
 
LVL 9

Expert Comment

by:TooKoolKris
ID: 9787028
Your Welcome
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB6 code to programmatically convert pdf to excel 21 87
VBA filters 2 59
SQL VB connection works in one PC and doesn't in another 15 64
Spell Check in VB6 13 112
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

776 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