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