Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating users/passwords on nt for web application
Message
From
27/03/2000 14:55:30
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Internet applications
Title:
Creating users/passwords on nt for web application
Miscellaneous
Thread ID:
00350936
Message ID:
00350936
Views:
56
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
Map
View

Click here to load this message in the networking platform