473,585 Members | 2,496 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 "Manufactur er"
in SELECT * FROM Win32_ComputerS ystem, how would I get that value? This is
the Searcher string that I'm using. Thanks!

ManagementObjec tSearcher MOSSearcher = new ManagementObjec tSearcher("SELE CT
* FROM Win32_ComputerS ystem");
Nov 16 '05 #1
1 2548

"GC" <gc@gc.com> wrote in message
news:u5******** ********@TK2MSF TNGP12.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
"Manufactur er" in SELECT * FROM Win32_ComputerS ystem, how would I get that
value? This is the Searcher string that I'm using. Thanks!

ManagementObjec tSearcher MOSSearcher = new
ManagementObjec tSearcher("SELE CT * FROM Win32_ComputerS ystem");

Basic SQL syntax...

SELECT Manufacturer FROM Win32_ComputerS ystem

Willy.
Nov 16 '05 #2

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

Similar topics

7
3964
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 didn't extract a description from my module docstrings. Even though I had a well formed docstring (one line, followed by a blank line, followed by...
3
5818
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 characters (including &quot; and &apos;) I have java code using Xerces to select a node based on it's @OID attribute using an XPath like this:
3
10059
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
10623
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 class .. var en_20031102=new Sermon("11/02",DLEWIS,"The Lord\'s Supper: The Art Of
3
12016
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 table without an image, so the border must be defined by the table. However, the table border does not look exactly like the single pixel one in the...
4
31205
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"> </Authors>
3
8438
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 called to_single_byte and to_multi_byte which convert a given multi byte character to single byte and vice versa respectively. thanks in advance...
19
2353
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 subset of records across all tables is often considered a separate logical system, but sometimes may be treaded ar part of the global system, and there...
8
2785
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
2162
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 trying to set up a page that changes every time it's visited, but without using php(which i don't know either) because it's not active on the server....
0
8199
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8336
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...
0
8212
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...
1
5710
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3835
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2343
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
1
1447
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1175
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...

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.