Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating users/passwords on nt for web application
Message
 
To
28/03/2000 07:25:05
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00350936
Message ID:
00351749
Views:
22
>Thanks Rick:
>
> I bought your book a month ago but not too much mentioned on ADSI in it. I'm still very new at this web development stuff!

ADSI has very little to do with the Internet. It's Active Directory which is more of a programmatic administration interface to the server.

+++ Rick ---


>
>Sheena
>
>
>
>>You can use the code below in an ASP page with a few syntax modifications for VBScript. Or you can use the VFP code in a VFP COM object (but that seems silly since it's not really doing anything you can't do directly in the ASP page).
>>
>>For error handling and checking for existing users you have to use the full ADSI path for the user and see if that returns a valid value.
>>
>>+++ Rick ---
>>
>>>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.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Reply
Map
View

Click here to load this message in the networking platform