Solved

Create a User

Posted on 2003-11-19
5
300 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

685 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