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. Embedding Copy Exe in Application Exe?

Embedding Copy Exe in Application Exe?

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

    I have developed a Tool . This tool basically check for latest release in the source location and automatically starts copying the release folder to destination. For copying i have used Robocopy software. I have written the code in Win32 console application C++. The problem is the robocopy software should be present in C drive ie (it is hard-coded in code). How can i attach Robocopy exe to main appliation Exe , such that whenever you invoke the application exe , it will search whether robocopy exe is present at that place , if not it will copy the robocopy exe which is embedded in the Application exe to required location. Is it possible? Do i need to convert from Win32 console application to MFC application? Thanks, Ashish

    R N J 3 Replies Last reply
    0
    • A Ash20

      I have developed a Tool . This tool basically check for latest release in the source location and automatically starts copying the release folder to destination. For copying i have used Robocopy software. I have written the code in Win32 console application C++. The problem is the robocopy software should be present in C drive ie (it is hard-coded in code). How can i attach Robocopy exe to main appliation Exe , such that whenever you invoke the application exe , it will search whether robocopy exe is present at that place , if not it will copy the robocopy exe which is embedded in the Application exe to required location. Is it possible? Do i need to convert from Win32 console application to MFC application? Thanks, Ashish

      R Offline
      R Offline
      Renjith Ramachandran
      wrote on last edited by
      #2

      You can embedd an exe/dll within your application itself as a resource(i recommends MFC & Visual Studio IDE for speed up your development). and later on you can extract and use it. the only problem is total size of your application will grow.

      Never Work Hard! - Work Smart!!!

      1 Reply Last reply
      0
      • A Ash20

        I have developed a Tool . This tool basically check for latest release in the source location and automatically starts copying the release folder to destination. For copying i have used Robocopy software. I have written the code in Win32 console application C++. The problem is the robocopy software should be present in C drive ie (it is hard-coded in code). How can i attach Robocopy exe to main appliation Exe , such that whenever you invoke the application exe , it will search whether robocopy exe is present at that place , if not it will copy the robocopy exe which is embedded in the Application exe to required location. Is it possible? Do i need to convert from Win32 console application to MFC application? Thanks, Ashish

        N Offline
        N Offline
        Nibu babu thomas
        wrote on last edited by
        #3

        Ash20 wrote:

        such that whenever you invoke the application exe , it will search whether robocopy exe is present at that place , if not it will copy the robocopy exe which is embedded in the Application exe to required location.

        Add this exe as a resource to your main exe. Later on if exe is not found at the required place, dump it there. Read this --> http://www.codeproject.com/cpp/UpdateResource.asp[^]


        Nibu thomas Microsoft MVP for VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http:\\nibuthomas.wordpress.com

        1 Reply Last reply
        0
        • A Ash20

          I have developed a Tool . This tool basically check for latest release in the source location and automatically starts copying the release folder to destination. For copying i have used Robocopy software. I have written the code in Win32 console application C++. The problem is the robocopy software should be present in C drive ie (it is hard-coded in code). How can i attach Robocopy exe to main appliation Exe , such that whenever you invoke the application exe , it will search whether robocopy exe is present at that place , if not it will copy the robocopy exe which is embedded in the Application exe to required location. Is it possible? Do i need to convert from Win32 console application to MFC application? Thanks, Ashish

          J Offline
          J Offline
          JudyL_MD
          wrote on last edited by
          #4

          If you have copied the robocopy exe to the user's hard drive, remember to remove it after your program is done its stuff so that the user's system is in the same state (except for what your program did) as before your program. Also, better check the licensing for Robocopy. It may prohibit you from doing what you want to do. Judy

          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