|Sample ASP page|
<CENTER><H1>Add a New user account.</H1></CENTER> <FORM> UserName : <INPUT NAME=UserName> UserPassword : <INPUT Name=UserPassword><INPUT TYPE=SUBMIT> </FORM> <% UN = Request("UserName") If UN <> "" Then 'Create Server object For Logon Set xServer = Server.CreateObject("UserManager.Server") 'www service is usually running under account without Account operator rights. 'Server object is used to logon to the account with the right. xServer.LogonUser "Administrator", "" 'The Next statements are executed under Administrator account. 'Add a new user Set User = xServer.Users.Add( UN, Request("UserPassword")) 'Some comment For the user User.Comment = "User from ASP page, " & Now() Response.Write "User <B>" & UN & "</B> Added.<BR>" Response.Write "List of users :<BR>" 'List all of server users. For Each User In xServer.Users Response.Write "<B>" & User.Name & "</B>, " & User.Comment & "<BR>" Next 'LogOff the Administrator xServer.RevertToSelf End If %>
ActiveX UserManager is easy to use COM component with classes to create, delete and manage local and remote user accounts, groups, servers and domains in the Windows NT (2000/XP) environment. You can simple work with user accounts and groups from VBA, VBS/JS, ASP and T-SQL programming environment.
© 1996 - 2009 Antonin Foller, Motobit Software | About, Contacts | e-mail: firstname.lastname@example.org