Click here to Skip to main content
15,890,185 members
Home / Discussions / C#
   

C#

 
AnswerRe: Copying List into KeyValuePair Pin
Luc Pattyn10-Jun-11 0:48
sitebuilderLuc Pattyn10-Jun-11 0:48 
QuestionContext Menu Menu Item Click Event Handler Pin
namelkcip9-Jun-11 16:38
namelkcip9-Jun-11 16:38 
AnswerRe: Context Menu Menu Item Click Event Handler Pin
PIEBALDconsult9-Jun-11 18:01
mvePIEBALDconsult9-Jun-11 18:01 
AnswerRe: Context Menu Menu Item Click Event Handler Pin
Luc Pattyn10-Jun-11 0:57
sitebuilderLuc Pattyn10-Jun-11 0:57 
QuestionHow to run NetworkInterface.GetAllNetworkInterfaces over the network on a remote machine? Pin
turbosupramk39-Jun-11 11:17
turbosupramk39-Jun-11 11:17 
AnswerRe: How to run NetworkInterface.GetAllNetworkInterfaces over the network on a remote machine? Pin
Mark Salsbery9-Jun-11 12:14
Mark Salsbery9-Jun-11 12:14 
GeneralRe: How to run NetworkInterface.GetAllNetworkInterfaces over the network on a remote machine? Pin
turbosupramk39-Jun-11 12:27
turbosupramk39-Jun-11 12:27 
AnswerRe: How to run NetworkInterface.GetAllNetworkInterfaces over the network on a remote machine? Pin
Luc Pattyn9-Jun-11 12:36
sitebuilderLuc Pattyn9-Jun-11 12:36 
Hi,

here is a code snippet I use to discover the content of some WMI class on the local machine; it tells what keys exist together with their value:
string clas="Win32...";
ManagementObjectSearcher searcher=new ManagementObjectSearcher("SELECT * FROM "+clas);
ManagementObjectCollection results=searcher.Get();
log("There are "+results.Count+" items in "+clas);
int count=0;
foreach (ManagementObject result in results) {
	log("=============== "+clas+"["+count+"] ===============");
	count++;
	PropertyDataCollection pdc=result.Properties;
	foreach (PropertyData pd in pdc) {
		string name=pd.Name;
		object obj=pd.Value;
		if (obj!=null) {
			string[] sa=obj as string[];
			if (sa!=null) {
				string ss=string.Join("\";\"", sa);
				log(count.ToString()+": "+name+" = string[] = \""+ss+"\"");
			} else {
				log(count.ToString()+": "+name+" = \""+obj.ToString()+"\"");
			}
		}
	}
}

You could adapt it to also run remotely and only report the key,value pairs you're interested in.

Smile | :)

PS: I'm sure the keys don't end on an equal sign!
Luc Pattyn [My Articles] Nil Volentibus Arduum
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Please use <PRE> tags for code snippets, they improve readability.
CP Vanity has been updated to V2.4

GeneralRe: How to run NetworkInterface.GetAllNetworkInterfaces over the network on a remote machine? Pin
turbosupramk39-Jun-11 13:48
turbosupramk39-Jun-11 13:48 
AnswerRe: How to run NetworkInterface.GetAllNetworkInterfaces over the network on a remote machine? Pin
Luc Pattyn9-Jun-11 13:59
sitebuilderLuc Pattyn9-Jun-11 13:59 
GeneralRe: How to run NetworkInterface.GetAllNetworkInterfaces over the network on a remote machine? Pin
Mark Salsbery9-Jun-11 12:42
Mark Salsbery9-Jun-11 12:42 
GeneralRe: How to run NetworkInterface.GetAllNetworkInterfaces over the network on a remote machine? Pin
turbosupramk39-Jun-11 14:15
turbosupramk39-Jun-11 14:15 
QuestionRunning .NET apps on Linux Pin
AmbiguousName9-Jun-11 3:00
AmbiguousName9-Jun-11 3:00 
AnswerRe: Running .NET apps on Linux Pin
Pete O'Hanlon9-Jun-11 3:17
mvePete O'Hanlon9-Jun-11 3:17 
AnswerRe: Running .NET apps on Linux Pin
BobJanova9-Jun-11 5:15
BobJanova9-Jun-11 5:15 
QuestionC# Windows Service Pin
scotlandc8-Jun-11 21:41
scotlandc8-Jun-11 21:41 
AnswerRe: C# Windows Service Pin
Pete O'Hanlon8-Jun-11 22:18
mvePete O'Hanlon8-Jun-11 22:18 
GeneralRe: C# Windows Service Pin
scotlandc8-Jun-11 22:22
scotlandc8-Jun-11 22:22 
AnswerRe: C# Windows Service Pin
AspDotNetDev8-Jun-11 22:46
protectorAspDotNetDev8-Jun-11 22:46 
GeneralRe: C# Windows Service Pin
MicroVirus9-Jun-11 3:41
MicroVirus9-Jun-11 3:41 
AnswerRe: C# Windows Service Pin
ShadowUz8-Jun-11 22:40
ShadowUz8-Jun-11 22:40 
AnswerRe: C# Windows Service Pin
ramzg8-Jun-11 23:02
ramzg8-Jun-11 23:02 
GeneralRe: C# Windows Service Pin
scotlandc9-Jun-11 0:46
scotlandc9-Jun-11 0:46 
AnswerRe: C# Windows Service Pin
Luc Pattyn9-Jun-11 1:42
sitebuilderLuc Pattyn9-Jun-11 1:42 
GeneralRe: C# Windows Service Pin
RobCroll9-Jun-11 3:55
RobCroll9-Jun-11 3:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.