| LogonUser sample | |
|---|---|
Dim Server, User
Set Server = CreateObject("UserManager.Server")
Server.LogonUser "Administrator", ""
'Create a new user
Set User = Server.Users.Add("NewUser", "UserPassword")
'Add the new user to the group
User.AddToLocalGroup "Guests"
'Logon new user
Server.LogonUser "NewUser", "UserPassword"
'Some other operations under new user account
Server.RevertToSelf | |