Imports System
Imports System.Management
Imports System.Windows.Forms
Namespace WMISample
Public Class MyWMIQuery
Public Overloads Shared Function Main() As Integer
Try
Dim arrComputers As String() = _
{"Sistemas"}
For Each strComputer As String In arrComputers
Console.WriteLine("==========================================")
Console.WriteLine("Computer: " & strComputer)
Console.WriteLine("==========================================")
Dim searcher As New ManagementObjectSearcher( _
"\\" + strComputer + "\root\CIMV2", _
"SELECT * FROM Win32_Processor")
For Each queryObj As ManagementObject In searcher.Get()
Console.WriteLine("-----------------------------------")
Console.WriteLine("Win32_Processor instance")
Console.WriteLine("-----------------------------------")
Console.WriteLine("Description: {0}", queryObj("Description"))
Console.WriteLine("Family: {0}", queryObj("Family"))
Console.WriteLine("Name: {0}", queryObj("Name"))
Next
Next
Catch err As ManagementException
MessageBox.Show("An error occurred while querying for WMI data: " & err.Message)
End Try
End Function
End Class
End Namespace
sábado, 17 de diciembre de 2011
Información del Sistema - VER QUE PROCESADOR TENGO VB.NET
Home »
Programadores
,
vb2010
,
Visual Basic .Net
,
WMI
»
Información del Sistema - VER QUE PROCESADOR TENGO VB.NET
VER QUE PROCESADOR TENGO VB.NET
No hay comentarios:
Publicar un comentario