Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. how to track the path of applications running in task manager?

how to track the path of applications running in task manager?

Scheduled Pinned Locked Moved C#
tutorialquestion
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gtag
    wrote on last edited by
    #1

    Using System.Diagnostics, I am able to track all the process and applications running in task manager. Checked every blog, but there is no information about tracking the path of applications running in taskmanager's application tab. I am getting path of process: using string q = Process.GetCurrentProcess().MainModule.FileName; 1. But for applications's path there is no option as such. Only name of the application can be tracked using "MainWindowTitle". 2. Even no of similar applications like if there are two excel applications are running then i want to find out the count but there is no option for MainWindowTitle count. nyone knows about this, then please give me clue. Thanks & Regards, gtag

    L L 2 Replies Last reply
    0
    • G gtag

      Using System.Diagnostics, I am able to track all the process and applications running in task manager. Checked every blog, but there is no information about tracking the path of applications running in taskmanager's application tab. I am getting path of process: using string q = Process.GetCurrentProcess().MainModule.FileName; 1. But for applications's path there is no option as such. Only name of the application can be tracked using "MainWindowTitle". 2. Even no of similar applications like if there are two excel applications are running then i want to find out the count but there is no option for MainWindowTitle count. nyone knows about this, then please give me clue. Thanks & Regards, gtag

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Do you want to get the application path of all running processes ?

      Process[] processes = Process.GetProcesses();
      foreach(Process process in processes)
      {
      Console.WriteLine(process.MainModule.FileName);
      }

      G 1 Reply Last reply
      0
      • L Lost User

        Do you want to get the application path of all running processes ?

        Process[] processes = Process.GetProcesses();
        foreach(Process process in processes)
        {
        Console.WriteLine(process.MainModule.FileName);
        }

        G Offline
        G Offline
        gtag
        wrote on last edited by
        #3

        It will give path of all running processes which u will find in task manager's process tab.But I need path of applications related to process which u will find in task manager's application tab. I need the path of process.MainWindowTitle's .

        L 1 Reply Last reply
        0
        • G gtag

          It will give path of all running processes which u will find in task manager's process tab.But I need path of applications related to process which u will find in task manager's application tab. I need the path of process.MainWindowTitle's .

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          http://www.programmersheaven.com/mb/csharp/390590/390590/how-to-get-applications-from-taskmanagers-tabs-/[^]

          G 1 Reply Last reply
          0
          • L Lost User

            http://www.programmersheaven.com/mb/csharp/390590/390590/how-to-get-applications-from-taskmanagers-tabs-/[^]

            G Offline
            G Offline
            gtag
            wrote on last edited by
            #5

            Thank you but I already checked above blog, its just giving the list of applications in application tab of task manager but I need even path(physical path of application on machine). I mean application's(MainWindowTitle's) location in disk.

            L 1 Reply Last reply
            0
            • G gtag

              Thank you but I already checked above blog, its just giving the list of applications in application tab of task manager but I need even path(physical path of application on machine). I mean application's(MainWindowTitle's) location in disk.

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              hei... think... you get the Process and use MainModule.Filename that is the application path.

              1 Reply Last reply
              0
              • G gtag

                Using System.Diagnostics, I am able to track all the process and applications running in task manager. Checked every blog, but there is no information about tracking the path of applications running in taskmanager's application tab. I am getting path of process: using string q = Process.GetCurrentProcess().MainModule.FileName; 1. But for applications's path there is no option as such. Only name of the application can be tracked using "MainWindowTitle". 2. Even no of similar applications like if there are two excel applications are running then i want to find out the count but there is no option for MainWindowTitle count. nyone knows about this, then please give me clue. Thanks & Regards, gtag

                L Offline
                L Offline
                Luc Pattyn
                wrote on last edited by
                #7

                I don't understand what it is you want, and seems like neither do the others. So stop repeating yourself, and improve your question using more and other words, and maybe some examples. :)

                Luc Pattyn

                :badger: :jig: :badger:

                Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.

                :jig: :badger: :jig:

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups