Solved

Embeding exe file

Posted on 2000-02-26
5
127 Views
Last Modified: 2010-05-18
Hello!

Is it possible to embed an external executable file in my application, so that there would be only one (the main)executable file?

Thanks
0
Comment
Question by:eruj
5 Comments
 
LVL 7

Expert Comment

by:ahalya
ID: 2561933
You can make your EXE more like a "Self Extracting" exe, and extract all support files when your exe is run.

if you like this approach, and would like some source, then I can email one of my similar project to you.
0
 
LVL 1

Expert Comment

by:XAN
ID: 2562315
of course. you can use it as resource.

other way ;) you can have one executable file, and other - any other type, that actually is external executable (may be only you will know about the nature of last ;)
0
 
LVL 6

Accepted Solution

by:
DrDelphi earned 50 total points
ID: 2562501
This example assumes that you have created a resource file named "Resfile.res" with the executable and named it "EXE". See my webpage for detials on how to do this if you are not sure.


{$resource 'resfile.res'}


var Stream:TresourceStream;
begin
     stream:=Tresourcestream.Create(Hinstance,'EXE','RT_RCDATA');
     stream.SaveToFile('Zoomer2.exe');
     Winexec('Zoomer2.exe',sw_ShowMaximized);
end;



Good luck!!

0
 
LVL 5

Expert Comment

by:Gwena
ID: 2563593
Hi DrDelphi :-)

  Where is your webpage?
0
 
LVL 6

Expert Comment

by:DrDelphi
ID: 2563630
www.drdelphi.com

Search for "Resource"
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question