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 / C++ / MFC
  4. get exe path

get exe path

Scheduled Pinned Locked Moved C / C++ / MFC
question
4 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.
  • M Offline
    M Offline
    Marcus Spitzmiller
    wrote on last edited by
    #1

    i know this is easy, but i can't find or remember it right now.... my program is whatever.exe. from inside that program, how can i get the full path that this exe is running? so, something that returns c:\program files\....\whatever.exe Any ideas? my brain and search skills appear to be shot tonight... Thanks! Marcus Spitzmiller "Why must life be so hard? Why must I fail at every attempt at masonry?" - Homer

    C G 2 Replies Last reply
    0
    • M Marcus Spitzmiller

      i know this is easy, but i can't find or remember it right now.... my program is whatever.exe. from inside that program, how can i get the full path that this exe is running? so, something that returns c:\program files\....\whatever.exe Any ideas? my brain and search skills appear to be shot tonight... Thanks! Marcus Spitzmiller "Why must life be so hard? Why must I fail at every attempt at masonry?" - Homer

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Pretty sure this is in the FAQ Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer

      M 1 Reply Last reply
      0
      • C Christian Graus

        Pretty sure this is in the FAQ Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer

        M Offline
        M Offline
        Marcus Spitzmiller
        wrote on last edited by
        #3

        yeah - you were right. thanks for the info. Marcus Spitzmiller "Why must life be so hard? Why must I fail at every attempt at masonry?" - Homer

        1 Reply Last reply
        0
        • M Marcus Spitzmiller

          i know this is easy, but i can't find or remember it right now.... my program is whatever.exe. from inside that program, how can i get the full path that this exe is running? so, something that returns c:\program files\....\whatever.exe Any ideas? my brain and search skills appear to be shot tonight... Thanks! Marcus Spitzmiller "Why must life be so hard? Why must I fail at every attempt at masonry?" - Homer

          G Offline
          G Offline
          gamitech
          wrote on last edited by
          #4

          have you tried : GetModuleFileNameEx(GetCurrentProcess(),GetModuleHandle(0),szExe,sizeof(szExe)); or GetFilePath() function which requires the handle of the file . gabby

          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