Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Windows NT Users and Groups
Message
From
31/08/2000 16:35:34
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00409329
Message ID:
00411499
Views:
25
>Then when I did:
>
> oNet = CREATEOBJECT("WScript.NetWork")
> lcDomainName = oNet.UserDomain
>
>it set lcDomainName = "Bob", but shouldn't it have set it to "Work1" instead?

Well, a worksgroup is not exactly a domain. For ADSI purposes, they are often interchangeable, but it doesn't surprise me that the WSH network object doesn't substitute the workgroup for the domain. You can try getting a better binding string with:

oComputer = GETOBJECT("WinNT://MYCOMPUTER,Computer")
cParent = oComputer.Parent

cParent will hold the binding string to the computer's parent object... appending a "/" and the computer name to it will generally get you the most direct binding string.
Erik Moore
Clientelligence
Previous
Reply
Map
View

Click here to load this message in the networking platform