J
Jim Scheffler
Hello Group,
I've put together this code below which gets information from the local
computer and prints it in a text box. I would like to be able to do the same
to other computers on my network but I'm not sure how to point WMI to
another computer. Here is the code I have so far,
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim search As New ManagementObjectSearcher("SELECT * FROM Win32_BIOS")
Dim search2 As New ManagementObjectSearcher("SELECT * FROM
Win32_ComputerSystem")
Dim search3 As New ManagementObjectSearcher("SELECT * FROM Win32_Processor")
Dim info As ManagementObject
For Each info In search.Get()
TextBox1.Text = "Serial Number: " & info("serialnumber").ToString() & CRLF
TextBox1.Text += "Manufacturer: " & info("Manufacturer").ToString() & CRLF
Next
For Each info In search2.Get()
TextBox1.Text() += "Model: " & info("Model").ToString() & CRLF
TextBox1.Text() += "Computer Name: " & info("Name").ToString() & CRLF
TextBox1.Text() += "User Name Logged in: " & info("UserName").ToString() &
CRLF & CRLF
TextBox1.Text() += "Total Physical Memory: " &
info("TotalPhysicalMemory").ToString() & (" KB of Ram") & CRLF
Next
For Each info In search3.Get()
TextBox1.Text() += "CPU Clock Speed: " & info("Name").ToString() & CRLF
Next
End Sub
Thanks for any help or web links you can provide on this matter,
Jim Scheffler
I've put together this code below which gets information from the local
computer and prints it in a text box. I would like to be able to do the same
to other computers on my network but I'm not sure how to point WMI to
another computer. Here is the code I have so far,
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim search As New ManagementObjectSearcher("SELECT * FROM Win32_BIOS")
Dim search2 As New ManagementObjectSearcher("SELECT * FROM
Win32_ComputerSystem")
Dim search3 As New ManagementObjectSearcher("SELECT * FROM Win32_Processor")
Dim info As ManagementObject
For Each info In search.Get()
TextBox1.Text = "Serial Number: " & info("serialnumber").ToString() & CRLF
TextBox1.Text += "Manufacturer: " & info("Manufacturer").ToString() & CRLF
Next
For Each info In search2.Get()
TextBox1.Text() += "Model: " & info("Model").ToString() & CRLF
TextBox1.Text() += "Computer Name: " & info("Name").ToString() & CRLF
TextBox1.Text() += "User Name Logged in: " & info("UserName").ToString() &
CRLF & CRLF
TextBox1.Text() += "Total Physical Memory: " &
info("TotalPhysicalMemory").ToString() & (" KB of Ram") & CRLF
Next
For Each info In search3.Get()
TextBox1.Text() += "CPU Clock Speed: " & info("Name").ToString() & CRLF
Next
End Sub
Thanks for any help or web links you can provide on this matter,
Jim Scheffler