Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

foreach on Win32_Process

Status
Not open for further replies.

Serated

MIS
Aug 17, 2009
10
NZ
Hi There,

Struggling to figure out in C# how to loop through a foreach and if a string does not exist to do a console.writeline(str).

What I am trying to achieve is, I am looping through the Win32_Process, then I am looking to see for a specific process is running but:

There are 6 processes with the same name but with different start up parameters. One of the parameters is the folder directory (which tells me which process is started) which I can get in the CommandLine of the query but need to report on which one has not started yet.

Could anyone point me in the right direction?

Much Appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top