Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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.

  #2 (permalink)  
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()


 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 03:12 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.