473,503 Members | 1,701 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I need some help with WMI in dotnet

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
Jul 21 '05 #1
0 1695

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

34
7273
by: Mark Kamoski | last post by:
Hi-- Please help. I need a code sample for bubble sort. Thank you. --Mark
1
1751
by: Jim H | last post by:
I am on a project where I am supposed to send an XML document to a SQL Server stored procedure. The XML Doc is a list strings. If in my c# function I get a list values as (string psValueList),...
7
3287
by: Timothy Shih | last post by:
Hi, I am trying to figure out how to use unmanaged code using P/Invoke. I wrote a simple function which takes in 2 buffers (one a byte buffer, one a char buffer) and copies the contents of the byte...
8
1811
by: Sai Kit Tong | last post by:
In the article, the description for "Modiy DLL That Contains Consumers That Use Managed Code and DLL Exports or Managed Entry Points" suggests the creation of the class ManagedWrapper. If I...
2
2265
by: Robert V. Hanson | last post by:
I have a user control built using the Microsoft IE Control. I declared a public variable as int32 (DefaultTab) in the user control. I can't seem to provide the correct syntax to the tabstrip...
8
1751
by: Elliot M. Rodriguez | last post by:
I am having a heckuva time debugging this, or determining why my page is behaving this way. I have a search form, that when completed, returns a datagrid. When the user selects a row (normal...
9
1858
by: James Radke | last post by:
Hello, I would like to create a sorted listbox which has one property that I can set to true or false to show if the listbox should be sorted (I may potentially add another one for the sort...
2
2388
by: Polyhedron_12 | last post by:
I am having problems calling functions in general in VB. I keep getting alot of errors. Can anybody help me out with this? I put the error message on the same line that it says it is at. I believe...
1
1285
by: Usman Ghani | last post by:
Hi All, Please help me to develop this one page please. I have a page on which I have a label control, just one label with no text. Next I start a loop to read the headers of emails and during...
3
1521
by: Scott Gunn | last post by:
Hello all I'm trying to use the scrollwindowex api however I have the same problem as this guy had. There is an answer here in the reply. I just need some help converting it to VB.Net >Thanks...
0
7273
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7322
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6982
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5000
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4667
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3161
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1501
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
374
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.