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. running exes

running exes

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++tutorial
7 Posts 6 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.
  • D Offline
    D Offline
    Dor
    wrote on last edited by
    #1

    I know this is a simple question but i can't seem to find the answer on MSDN. Does anyone know how to run an exe with a command line style argument out of an MFC program? Cheers Dor

    N L M J 4 Replies Last reply
    0
    • D Dor

      I know this is a simple question but i can't seem to find the answer on MSDN. Does anyone know how to run an exe with a command line style argument out of an MFC program? Cheers Dor

      N Offline
      N Offline
      Nish Nishant
      wrote on last edited by
      #2

      You can use ShellExecute(...) For more info you can see this article :- http://www.codeproject.com/useritems/newbiespawn.asp Nish


      Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.

      B 1 Reply Last reply
      0
      • D Dor

        I know this is a simple question but i can't seem to find the answer on MSDN. Does anyone know how to run an exe with a command line style argument out of an MFC program? Cheers Dor

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

        You can use exec routine for this. For more details, refer to MSDN

        1 Reply Last reply
        0
        • D Dor

          I know this is a simple question but i can't seem to find the answer on MSDN. Does anyone know how to run an exe with a command line style argument out of an MFC program? Cheers Dor

          M Offline
          M Offline
          Mazdak
          wrote on last edited by
          #4

          If I don't make a mistake there is win32 function name CreateProcess(). Mazy "The path you tread is narrow and the drop is shear and very high, The ravens all are watching from a vantage point near by, Apprehension creeping like a choo-train uo your spine, Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd

          1 Reply Last reply
          0
          • N Nish Nishant

            You can use ShellExecute(...) For more info you can see this article :- http://www.codeproject.com/useritems/newbiespawn.asp Nish


            Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.

            B Offline
            B Offline
            Brian Delahunty
            wrote on last edited by
            #5

            Nish [BusterBoy] wrote: You can use ShellExecute(...) Your obsessed with ShellExecute Nish... well.. I suppose with all the pushing Microsoft are doing on it :)


            "Isn't that the "write once, debug everywhere" language?" Tom Archer on Java... :)

            N 1 Reply Last reply
            0
            • B Brian Delahunty

              Nish [BusterBoy] wrote: You can use ShellExecute(...) Your obsessed with ShellExecute Nish... well.. I suppose with all the pushing Microsoft are doing on it :)


              "Isn't that the "write once, debug everywhere" language?" Tom Archer on Java... :)

              N Offline
              N Offline
              Nish Nishant
              wrote on last edited by
              #6

              Brian Delahunty wrote: Your obsessed with ShellExecute Nish... I am? Nish :(


              Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.

              1 Reply Last reply
              0
              • D Dor

                I know this is a simple question but i can't seem to find the answer on MSDN. Does anyone know how to run an exe with a command line style argument out of an MFC program? Cheers Dor

                J Offline
                J Offline
                Jason Henderson
                wrote on last edited by
                #7

                If you don't want to wait for the new process to finish just use WinExec or ShellExecute. If you need to wait use CreateProcess. Like it or not, I'm right.

                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