473,657 Members | 2,659 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(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click

Dim search As New ManagementObjec tSearcher("SELE CT * FROM Win32_BIOS")

Dim search2 As New ManagementObjec tSearcher("SELE CT * FROM
Win32_ComputerS ystem")

Dim search3 As New ManagementObjec tSearcher("SELE CT * FROM Win32_Processor ")

Dim info As ManagementObjec t

For Each info In search.Get()

TextBox1.Text = "Serial Number: " & info("serialnum ber").ToString( ) & CRLF

TextBox1.Text += "Manufactur er: " & info("Manufactu rer").ToString( ) & CRLF

Next

For Each info In search2.Get()

TextBox1.Text() += "Model: " & info("Model").T oString() & CRLF

TextBox1.Text() += "Computer Name: " & info("Name").To String() & CRLF

TextBox1.Text() += "User Name Logged in: " & info("UserName" ).ToString() &
CRLF & CRLF

TextBox1.Text() += "Total Physical Memory: " &
info("TotalPhys icalMemory").To String() & (" KB of Ram") & CRLF

Next

For Each info In search3.Get()

TextBox1.Text() += "CPU Clock Speed: " & info("Name").To String() & CRLF

Next

End Sub

Thanks for any help or web links you can provide on this matter,

Jim Scheffler
Jul 21 '05 #1
0 1704

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

Similar topics

34
7302
by: Mark Kamoski | last post by:
Hi-- Please help. I need a code sample for bubble sort. Thank you. --Mark
1
1774
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), how would I create an XML document from that. I am assuming that the XML doc will be treated as a table of values in the stored procedure. Am I even asking the right question ro am I way off track?
7
3301
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 buffer into the character pointer. The code looks like the following: #include <stdio.h> #include <stdlib.h> #include "stdafx.h" BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call,
8
1828
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 need to build multiple mixed mode dll's used by a consumer application, do I have to implement multiple ManagedWrapper's (each embedded in indiviudal DLL project) and call all of them in my consumer application?
2
2273
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 property other than SelectedIndex = 1 which works but if I try SelectedIndex = DefaultTab, it fails stating that DefaultTab is not a valid value for Int32. Thanks in advance for any help!!
8
1764
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 selectcommand button), i assign some session variables and perform a rediect to a "more information" page. Neither page is using Output Caching. On the more information page, a button reads "new search". this clears the session variables i set in...
9
1863
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 direction - asc, or desc). Then, if it should be sorted, everytime an item is added to the list via Items.Add or or deleted via items.remove, I would like it to automatically resort the list. I have created the base class below... but this only...
2
2397
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 that I am not calling the function correctly. The MyInsertMethod function is the function that comes in the Web Matrix Toolbox <%@ Page Language="VB" %>
1
1298
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 each loop round, I add rows to table. Now ok this plain text et addition is not a problem. In one cell I want to add a check box at run time and here don't know how to that.
3
1533
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 Peter, it works. I have another question for you. What does the >clip rectangle passed on the 5th argument does? > >Thanks
0
8385
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8303
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8723
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8502
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8602
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7316
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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 we have to send another system
2
1601
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.