Option Compare Database Option Explicit Public Function WMI_INSTALADO() As Boolean 'http://www.microsoft.com/latam/technet/articulos/windows2k/wmixwdm/ 'lo anterior si quieres saber qué significa WMI Dim WMI As Object On Error Resume Next Set WMI = GetObject("winmgmts:") WMI_INSTALADO = (Err.Number = 0) End Function Private Sub Form_Load() If WMI_INSTALADO() Then MsgBox "Su sistema posee WMI" getWMI_Info Else MsgBox "Su sistema no posee WMI" End If End Sub Private Sub getWMI_Info() Dim oAdapters As Object Dim oAdapter As Object Dim StrComputer As String StrComputer = "PCESTHER" ' Control Errores On Error GoTo Control_ERROR Set oAdapters = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & StrComputer & "\Windows").ExecQuery( _ "SELECT * FROM Win32_ComputerSystem") ' Datos For Each oAdapter In oAdapters With oAdapter MsgBox "Usuario: " & .UserName End With Next On Error GoTo 0 Exit Sub Control_ERROR: MsgBox "Error: " & Err.Number & vbTab & Err.Description, vbCritical Resume Next End Sub