Hola amigos:
NetName() nos devuelve el nombre de la PC, NetName(.t.) el nombre del usuario; alguna funcion para obtener el nombre del GRUPO DE TRABAJO ??
Salu2
#Include "FiveWin.ch"
//-----------------------//
Function Main()
Local oLoc,oWmi,oList,oItem
oLoc:= CreateObject( "wbemScripting.SwbemLocator" )
oWmi:= oLoc:ConnectServer()
If oWmi == NIL
? "Sorry!! No Wmi"
Return
Endif
oList := oWmi:ExecQuery("Select * from Win32_ComputerSystem")
FOR EACH oItem IN oList
cComputerDomain = oItem:Domain
If oItem:PartOfDomain
? "Computer Domain: " + cComputerDomain
Else
? "Workgroup: " + cComputerDomain
EndIf
Next
Return NIL
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: paquitohm and 15 guests