Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Network domain or workgroup
Message
From
22/12/2008 17:16:58
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01369239
Message ID:
01369272
Views:
8
>OK, last one, What about WMI?
>
loItem.PartOfDomain ===== brought me the right answer of .f. (reason:we don't have a network domain)
loItem.Workgroup ====== brought we the wrong answer of NULL (reason:we run under workgroup network)
loItem.Domain ====== brought me PSYSTEMS (the name of our workgroup)... could be the answer of workgroup property...

I'm not sure under this weird answer if it can be reliable to run under production phase.. What do you think?

>
>loLocator		= CREATEOBJECT('WBEMScripting.SWBEMLocator')
>loWMI			= loLocator.ConnectServer()
>loItems			= loWMI.ExecQuery("Select * from Win32_ComputerSystem")
>
>For Each loItem in loItems
>    ? Iif(loItem.PartOfDomain, "Computer Domain: " + loItem.Domain, "Workgroup: " + loItem.Workgroup)
>Next
>
>
>[Updated]
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform