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. How to execute an exe

How to execute an exe

Scheduled Pinned Locked Moved C / C++ / MFC
performancehelptutorial
9 Posts 4 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.
  • V Offline
    V Offline
    VikramDelhi i
    wrote on last edited by
    #1

    :rose:Hi I want to know how i can extract an exe into memory and then execute it directly from memory. Any idea or ref:confused:. Pl. help me. thanks

    T 1 Reply Last reply
    0
    • V VikramDelhi i

      :rose:Hi I want to know how i can extract an exe into memory and then execute it directly from memory. Any idea or ref:confused:. Pl. help me. thanks

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      ::ShellExecute()


      TOXCCT >>> GEII power
      [toxcct][VisualCalc 2.20][VisualCalc 3.0]

      E 1 Reply Last reply
      0
      • T toxcct

        ::ShellExecute()


        TOXCCT >>> GEII power
        [toxcct][VisualCalc 2.20][VisualCalc 3.0]

        E Offline
        E Offline
        Eytukan
        wrote on last edited by
        #3

        He wrote:

        into memory

        he wants to do it "on the fly" not wanting to land on disk !!


        "But your mind is very complex, very tricky. It makes simple things complicated. -- that's its work. And for centuries it has been trained for only one thing: to make things so complicated that your life becomes impossible."- Osho

        --[V]--

        T 1 Reply Last reply
        0
        • E Eytukan

          He wrote:

          into memory

          he wants to do it "on the fly" not wanting to land on disk !!


          "But your mind is very complex, very tricky. It makes simple things complicated. -- that's its work. And for centuries it has been trained for only one thing: to make things so complicated that your life becomes impossible."- Osho

          --[V]--

          T Offline
          T Offline
          toxcct
          wrote on last edited by
          #4

          VivekuniQ wrote:

          he wants to do it "on the fly" not wanting to land on disk !!

          there no way AFAIK... but maybe he can write a temporary exe on the disk, ShellExecute() it, and when it exits, delete the file...?!


          TOXCCT >>> GEII power
          [toxcct][VisualCalc 2.20][VisualCalc 3.0]

          V 1 Reply Last reply
          0
          • T toxcct

            VivekuniQ wrote:

            he wants to do it "on the fly" not wanting to land on disk !!

            there no way AFAIK... but maybe he can write a temporary exe on the disk, ShellExecute() it, and when it exits, delete the file...?!


            TOXCCT >>> GEII power
            [toxcct][VisualCalc 2.20][VisualCalc 3.0]

            V Offline
            V Offline
            VikramDelhi i
            wrote on last edited by
            #5

            I want to execute exe directly from memory. I am writing a binder that will bind my project files and execute them to the memoty.I am doing this to make single exe out of several. Any idea or ref.:confused:

            T 1 Reply Last reply
            0
            • V VikramDelhi i

              I want to execute exe directly from memory. I am writing a binder that will bind my project files and execute them to the memoty.I am doing this to make single exe out of several. Any idea or ref.:confused:

              T Offline
              T Offline
              toxcct
              wrote on last edited by
              #6

              is it ok for you, instead of creating an exe "in memory" an launch it as is, to create threads and processes instead ? as i am understanding your last comment, you're trying to make several independant units that are running separatedly (but maybe synchronized). this way, threads may be what you're looking for...


              TOXCCT >>> GEII power
              [toxcct][VisualCalc 2.20][VisualCalc 3.0]

              V 1 Reply Last reply
              0
              • T toxcct

                is it ok for you, instead of creating an exe "in memory" an launch it as is, to create threads and processes instead ? as i am understanding your last comment, you're trying to make several independant units that are running separatedly (but maybe synchronized). this way, threads may be what you're looking for...


                TOXCCT >>> GEII power
                [toxcct][VisualCalc 2.20][VisualCalc 3.0]

                V Offline
                V Offline
                VikramDelhi i
                wrote on last edited by
                #7

                Well that sounds great. should i load exe that is at the end of main exe file and create a process with the address of second exe. well i have joined (appended) 2 exe files. now i want to load 2nd exe (which is at end of 1st exe) to the memory.

                G 1 Reply Last reply
                0
                • V VikramDelhi i

                  Well that sounds great. should i load exe that is at the end of main exe file and create a process with the address of second exe. well i have joined (appended) 2 exe files. now i want to load 2nd exe (which is at end of 1st exe) to the memory.

                  G Offline
                  G Offline
                  GuimaSun
                  wrote on last edited by
                  #8

                  You can embed binary files as "binary" resources inside your exe, easy as embeding an icon. Then you can save the binary contents as a "temporary" .exe, and execute it. I hope it helps :) Guimasun GuimaSun www.nexsun.com.br NEXSUN TechZone

                  V 1 Reply Last reply
                  0
                  • G GuimaSun

                    You can embed binary files as "binary" resources inside your exe, easy as embeding an icon. Then you can save the binary contents as a "temporary" .exe, and execute it. I hope it helps :) Guimasun GuimaSun www.nexsun.com.br NEXSUN TechZone

                    V Offline
                    V Offline
                    VikramDelhi i
                    wrote on last edited by
                    #9

                    Hi Thanks a lot for help. I think there is no way to execute exe file from memory. So i am going to use ShellExecute(). well if i find out any way i'll ley you know. thanks

                    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