Information générale
Catégorie:
Applications Internet
Titre:
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.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement