Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
API Funtionality needed
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00964554
Message ID:
00965324
Views:
9
I've done something similar, using an external vb application and ADSI. I looped through the data calling the application to add users.

You can see here http://support.microsoft.com/kb/q190741/ for an example of listing users via ADSI and VFP.

The code I run in vb is basically this, although when i run it in VFP it gives me an unknown error on the loUser.SetInfo() line.
LOCAL lcUser, lcPassword

lcUser = "testuser3"
lcPassword = "testpassword"

LOCAL ADSIPath, adsiComputer, loUser
ADSIPath = "WinNT://localhost"

adsiComputer = GetObject(ADSIPath)

loUser = adsiComputer.Create("User", lcUser)
loUser.SetPassword(lcPassword)

loUser.SetInfo()
>I'm looking for a way to add users to a windows 2000 server, add them to a group, set their password to need changed on next logon and to set their startup program to a specified value. The problem is that I want to do it so that I can take the user names from the user database of our application to allow us to give each user their own logon. So far the examples I have found have been neither understandable nor have the covered everything I need. Case in point, most examples have shown how to set the startup program in a domain on a windows 2003 server, we are using windows 2000 servers that are not in a domain. Obviously I am having trouble figuring this out. Anybody got any good pointers for this situation?
A fish this fine deserves to be a fish nugget styled chunklet.
- Fry
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform