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. File Name

File Name

Scheduled Pinned Locked Moved C#
tutorialquestion
3 Posts 2 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.
  • Y Offline
    Y Offline
    Yoyosh 0
    wrote on last edited by
    #1

    We can get all processes running in system by calling: Process.GetProcesses(); For each process, how to get the name of the file, that was executed to start this process? thank you very much in advance

    Mircea PuiuM 1 Reply Last reply
    0
    • Y Yoyosh 0

      We can get all processes running in system by calling: Process.GetProcesses(); For each process, how to get the name of the file, that was executed to start this process? thank you very much in advance

      Mircea PuiuM Offline
      Mircea PuiuM Offline
      Mircea Puiu
      wrote on last edited by
      #2

      For each Process object in the collection returned by Process.GetProcesses(), use the MainModule property. A process module represents a.dll or .exe file that is loaded into a particular process. The MainModule property lets you view information about the executable used to start the process, including the module name, file name, and module memory details.

      SkyWalker

      Y 1 Reply Last reply
      0
      • Mircea PuiuM Mircea Puiu

        For each Process object in the collection returned by Process.GetProcesses(), use the MainModule property. A process module represents a.dll or .exe file that is loaded into a particular process. The MainModule property lets you view information about the executable used to start the process, including the module name, file name, and module memory details.

        SkyWalker

        Y Offline
        Y Offline
        Yoyosh 0
        wrote on last edited by
        #3

        Thanks a lot! This was it

        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