Adding data files to EXE file - HELP! 
Author Message
 Adding data files to EXE file - HELP!

I've nearly finished a program in Turbo Pascal 7.0, and I'm looking to
creating an installation utility for it. It would be very practical if
the installation executable was the only file needed, ie. all data was
contained within the .EXE, and then read by the .EXE itself during
run-time.

I've heard that it is possible to use the dos Copy command to append any
file to the end of the .EXE, and then Seek to the end of the .EXE (by
getting info from the EXE header) to read the extra data part. However I
need help to achieve this. How can I read the header of the executable
to know where to start reading the data? How can I use the Copy command
to append the data in first place?

Any input will be greatly appreciated.

Haakon Nilsen.



Wed, 18 Jun 1902 08:00:00 GMT  
 Adding data files to EXE file - HELP!

Quote:

> I've nearly finished a program in Turbo Pascal 7.0, and I'm looking to
> creating an installation utility for it. It would be very practical if
> the installation executable was the only file needed, ie. all data was
> contained within the .EXE, and then read by the .EXE itself during
> run-time.

> I've heard that it is possible to use the dos Copy command to append any
> file to the end of the .EXE, and then Seek to the end of the .EXE (by
> getting info from the EXE header) to read the extra data part. However I
> need help to achieve this. How can I read the header of the executable
> to know where to start reading the data? How can I use the Copy command
> to append the data in first place?

> Any input will be greatly appreciated.

> Haakon Nilsen.

 How about making it a selfextracting archive?

 Remco de Korte



Wed, 18 Jun 1902 08:00:00 GMT  
 Adding data files to EXE file - HELP!

Quote:
>I've heard that it is possible to use the dos Copy command to append any
>file to the end of the .EXE, and then Seek to the end of the .EXE (by
>getting info from the EXE header) to read the extra data part. However I
>need help to achieve this. How can I read the header of the executable
>to know where to start reading the data? How can I use the Copy command
>to append the data in first place?

EXE header information is available in Ralf Brown's Interrupt List.
dos command to copy:
C> COPY XINSTALL.EXE+PROGRAM.EXE INSTALL.EXE
Does not work with XCOPY.

Another way you could do it is use BINOBJ on the EXE, link it into the
program, and write it. I also saw a utility in SWAG which converts any
file into Turbo Pascal source or a DEBUG script which will write the file
to disk. That could be useful as well.
--
Hi! I'm a .signature virus! Copy me into yours and join in the fun!



Wed, 18 Jun 1902 08:00:00 GMT  
 Adding data files to EXE file - HELP!

Quote:

> EXE header information is available in Ralf Brown's Interrupt List.
> dos command to copy:
> C> COPY XINSTALL.EXE+PROGRAM.EXE INSTALL.EXE
> Does not work with XCOPY.

Be sure to use the  /b  switch when using copy to concatenate anything
other than text files.

Rob



Wed, 18 Jun 1902 08:00:00 GMT  
 Adding data files to EXE file - HELP!

Supposing you did copy a data file to an EXE, how would you address it to
use it?
Just wondering....

=)~~



Wed, 18 Jun 1902 08:00:00 GMT  
 Adding data files to EXE file - HELP!

Quote:

> Supposing you did copy a data file to an EXE, how would you address it to
> use it?
> Just wondering....

> =)~~

Open the .exe-file, skip (seek) the exe-part and read the data. For this
you need to know the size of the exe-part which you can get from
substracting the data-size from the size of the whole file.

Remco de Korte
Soft Machine
Nederland
http://www.xs4all.nl/~remcodek/download.html



Wed, 18 Jun 1902 08:00:00 GMT  
 Adding data files to EXE file - HELP!

//--I've nearly finished a program in Turbo Pascal 7.0, and I'm looking to
//--creating an installation utility for it. It would be very practical if
//--the installation executable was the only file needed, ie. all data was
//--contained within the .EXE, and then read by the .EXE itself during
//--run-time.
//--
//--Haakon Nilsen.

Still looking for the answer? Go to my website/Pascal section and
there is all the info you'll need + example in Pascal.


 WWW: http://www.worldonline.nl/~nederm
 AKA Mighty Research
 Sig. version 1.05.934.352a  build 7831



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Adding data files to EXE's

2. Help adding self-checksum data to an EXE/COM

3. Help adding self-checksum data to an EXE/COM

4. adding of icon in to exe file

5. Adding word to EXE-file

6. add programm to beginning of a exe file.

7. file.exe not file.pas

8. file.exe not file.pas

9. which files do I include with exe file?

10. HELP ! HELP PLEASE IN COMPILE TO EXE FILE

11. convert *.exe files to *.pas files

12. BGI file linked in EXE file?

 

 
Powered by phpBB® Forum Software