Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating users/passwords on nt for web application
Message
De
27/03/2000 14:55:30
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Titre:
Creating users/passwords on nt for web application
Divers
Thread ID:
00350936
Message ID:
00350936
Vues:
57
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
Fil
Voir

Click here to load this message in the networking platform