General information
Category:
Internet applications
Title:
Creating users/passwords on nt for web application
Hello:
I need to create, modify and delete NT Users from a VFP com. I wanted to build a html form that users can add their own
accounts and passwords.
I was told I can do the following:
1) download the adsi package
2) do I put this code in an asp page, or com on the server?
oComputer = GETOBJECT("WinNT://MyMachineName")
lcUserName = "Sheena"
lcFullName = "Sheena Escott"
lcPassword = "jiggle"
lcDescription = "Programmer Type"
oNewUser = oComputer.Create("User",lcUserName)
oNewUser.Setinfo() && Adds the account. This line throws the error if the user exists, or if there's any other problem
oNewUser.SetPassword(lcPassword)
oNewUser.FullName = lcFullName
oNewUser.Decription = lcDescription
oNewUser.SetInfo() && Finalizes the settings
Any input would be appreciated.
The ADSI object model for the WinNT provider is documented in MSDN.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only