Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Windows 2000 Users
Message
From
23/07/2003 14:46:16
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00812720
Message ID:
00812885
Views:
12
How can i get the lists of the available users on my windows 2000 server ?
>I know there are objects to permit this but i don't remember the exact syntax.
>
>Thanks in advance



Hi Michele,

Replace "MYDOMAIN" with your domain or W2k server name if you want local server user accounts

Try this:
CLEAR
*-- Set lcMyDomain to be your domain or server for local server accounts
lcMyDomain = "MYDOMAIN"
oDomain = GetObject('WinNT://' + lcMyDomain)
FOR EACH oItem IN oDomain
    IF oItem.Class = "User"
        ? oItem.Name
    ENDIF
ENDFOR
HTH,

- Brian


VFP6 SP5, VFP8 SP1, VFP 9 SP 1 and Win XP SP 3 (unless otherwise specified)


www.wulfsden.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform