Hi,
i need path of all running application. if we have two ms-word doc file, so how i can find path of this two file. i find path of notepad using
ManagementClass MgmtClass = new ManagementClass("Win32_Process");
and CommandLine property. it gives only path of notepad allpication only, but not work in the case of word,xls file.
plz help me

Dan2 pointsPosted Apr 30, 2008, 3:01 PM EDT
- not sure if I understand exactly what you're asking - but if I do then something like this might work:
string currentProcess; int searchCount = 0; Array processArray = Process.GetProcesses(); searchCount = 0; itIsRunning = false; while (searchCount < processArray.Length) { currentProcess = processArray.GetValue(searchCount).ToString(); if (currentProcess == "System.Diagnostics.Process (the_process_I_am_looking_for)") { itIsRunning = true; searchCount = processArray.Length; } searchCount++; }