Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 17th, 2005, 12:57 PM
Registered User
 
Join Date: Apr 2004
Location: , , .
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Create User Account

Does anyone have an example of how to create a user account and add that user to a local group. I need this for standalone server Not with Active Directory.

 
Old June 20th, 2005, 08:34 AM
Registered User
 
Join Date: Apr 2004
Location: , , .
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Geez Thanks OK Here it is:
            Dim strPath As String = "WinNT://" & local_Computer_name
            ' Create a new 'DirectoryEntry' with the given path.
            Dim myDE As New System.DirectoryServices.DirectoryEntry(strPath)
            Dim myEntries As System.DirectoryServices.DirectoryEntries = myDE.Children
            ' Create a new entry 'Sample' in the container.
            Dim myDirectoryEntry As System.DirectoryServices.DirectoryEntry = myEntries.Add(newuser, "User")

            ' Save changes of entry in the 'Active Directory'.

            Dim TmpObj As Object = myDirectoryEntry.Invoke("SetPassword", newpass)
            myDirectoryEntry.CommitChanges()






Similar Threads
Thread Thread Starter Forum Replies Last Post
chapter 15 -create user account melania BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 15 December 5th, 2008 05:53 PM
TO retrieive all user account name vinothsiva General .NET 1 June 15th, 2007 05:29 PM
How to creat an user account prad_a PHP Databases 1 May 12th, 2007 03:25 AM
Inactivate User Account NinaWilliam ASP.NET 1.0 and 1.1 Basics 5 March 13th, 2006 10:13 AM
MSDE, how create database, user account ??? majidnakit All Other Wrox Books 1 January 7th, 2005 03:12 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.