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. Execute programs with arguments

Execute programs with arguments

Scheduled Pinned Locked Moved C / C++ / MFC
c++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.
  • F Offline
    F Offline
    FredrickNorge
    wrote on last edited by
    #1

    I am creating a simple launcher for quake2 in mfc where i want to launch it with "quake2.exe +set maxclients 16" etc. I am only familiar with shellexecute, but i have problems launching anything with arguments, is there anything built in mfc or a c++ function i could use to launch with arguments? Thanks.

    CPalliniC D 2 Replies Last reply
    0
    • F FredrickNorge

      I am creating a simple launcher for quake2 in mfc where i want to launch it with "quake2.exe +set maxclients 16" etc. I am only familiar with shellexecute, but i have problems launching anything with arguments, is there anything built in mfc or a c++ function i could use to launch with arguments? Thanks.

      CPalliniC Offline
      CPalliniC Offline
      CPallini
      wrote on last edited by
      #2

      Actually ShellExecute allows you to specify application parameters. What are you doubts about? :confused:

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.

      In testa che avete, signor di Ceprano?

      F 1 Reply Last reply
      0
      • CPalliniC CPallini

        Actually ShellExecute allows you to specify application parameters. What are you doubts about? :confused:

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.

        F Offline
        F Offline
        FredrickNorge
        wrote on last edited by
        #3

        I guess i did not test it fully, now that i know it should work i am sure il sort it out :)

        1 Reply Last reply
        0
        • F FredrickNorge

          I am creating a simple launcher for quake2 in mfc where i want to launch it with "quake2.exe +set maxclients 16" etc. I am only familiar with shellexecute, but i have problems launching anything with arguments, is there anything built in mfc or a c++ function i could use to launch with arguments? Thanks.

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          FredrickNorge wrote:

          I am only familiar with shellexecute, but i have problems launching anything with arguments, is there anything built in mfc or a c++ function i could use to launch with arguments?

          See here.


          "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

          "Judge not by the eye but by the heart." - Native American Proverb

          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