473,403 Members | 2,323 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

WMI - get single attribute

GC
Hi,
All the examples of getting WMI information shows using a foreach loop to
loop though multiple entries, like to more than one IP address, etc. If I
just want to get the value for single value attributes, like "Manufacturer"
in SELECT * FROM Win32_ComputerSystem, how would I get that value? This is
the Searcher string that I'm using. Thanks!

ManagementObjectSearcher MOSSearcher = new ManagementObjectSearcher("SELECT
* FROM Win32_ComputerSystem");
Nov 16 '05 #1
1 2539

"GC" <gc@gc.com> wrote in message
news:u5****************@TK2MSFTNGP12.phx.gbl...
Hi,
All the examples of getting WMI information shows using a foreach loop to
loop though multiple entries, like to more than one IP address, etc. If I
just want to get the value for single value attributes, like
"Manufacturer" in SELECT * FROM Win32_ComputerSystem, how would I get that
value? This is the Searcher string that I'm using. Thanks!

ManagementObjectSearcher MOSSearcher = new
ManagementObjectSearcher("SELECT * FROM Win32_ComputerSystem");

Basic SQL syntax...

SELECT Manufacturer FROM Win32_ComputerSystem

Willy.
Nov 16 '05 #2

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

Similar topics

7
by: Brian van den Broek | last post by:
Hi all, I'm posting partly so my problem and solution might be more easily found by google, and partly out of mere curiosity. I've just spent a frustrating bit of time figuring out why pydoc...
3
by: Kevin | last post by:
I know this has probably been discussed many times before (I found answers when I searched yesterday), but I still can't get it to work... I have an attribute @OID that can contain any...
3
by: |-|erc | last post by:
these 3 lines will put the following into the URL bar! but with 2 input boxes it doesn't. <form name=test> <INPUT name='selqty2'> </form> file:///C:/WINDOWS/DESKTOP/tttt2.html?selqty2=55555
4
by: sankofa | last post by:
hi, i can't seem to be able to escape my single quote properly... is it even possible in javascript? this is a portion of my code.. var DLEWIS="Pastor Lewis"; .... Sermon is a yser-defined...
3
by: Bob Sanderson | last post by:
I have a number of pages containing tables. Most have background images which have a single pixel border. The tables themselves do not have borders. For various reasons, I have to create one...
4
by: Greg | last post by:
I keep getting an error when I have a tick mark in a text value that I am searching for in my XPath Query. Example: <Authors> <Author LastName="O'Donnel"> <Author LastName="Smith">...
3
by: mailar | last post by:
HI, Can anyone tell me how is a multi_byte to single byte and vice versa conversion done in DB2. It would be great even if someone can tell me how Oracle does it? Oracle already has functions...
19
by: Steve Jorgensen | last post by:
I've run across this issue several times of late, and I've never come up with a satisfactory answer to the best way to handle this schema issue. You have a large section of schema in which a...
8
by: dotnetnoob | last post by:
EvtEnrollAttr.Value = "3748" EvtEnrollElem.Attributes.Append(EvtEnrollAttr) i need the attr value to be <stuff ID = '3748'> in single quote how can i do that with visual basic.net? thanks
5
by: elbin | last post by:
Hello, first to say that I am a total beginner in Javascript but I know some programming (python in particular) and am able to understand methods/parameters and so on. Here's my problem: I am...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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...
0
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...
0
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,...
0
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...

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.