Write Data to Binary File

P

Prabhat

Hi Friends,

I have one EXE file that customer need to download from my website. But I
have one text file of Max 250 bytes of text in in that I want to append to
the END of the Binary EXE file and give that for download to user. How can I
do that. Please suggest. I think we need to go for some BinaryWrite kind of
procedure using ADO Stream.

Please suggest
Prabhat
 
D

David Wang [Msft]

Your choices:
1. Have IIS download the EXE file as a static file, and configure Footer for
that file only
2. Have an ASP page which reads the EXE file and BinaryWrite's the text file

Of course, you can do whatever you want. If you insist on writing ASP code,
go right ahead; most people prefer the Static File and Footer approach
because it's just configuration - no code necessary.

Aren't you corrupting the EXE by appending the text?

--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//
 
P

Prabhat

David Wang said:
Your choices:
1. Have IIS download the EXE file as a static file, and configure Footer for
that file only
2. Have an ASP page which reads the EXE file and BinaryWrite's the text file

Of course, you can do whatever you want. If you insist on writing ASP code,
go right ahead; most people prefer the Static File and Footer approach
because it's just configuration - no code necessary.

Aren't you corrupting the EXE by appending the text?

Hi David,

Thanks for your suggestion. I did not know abt the Footer one. How can I do
that in IIS 5.0 on windows 2000 Serv? Can we set the Footer only for one EXE
? Can you help me in that?

Thanks
Prabhat
 
D

David Wang [Msft]

This sounds like a one-off case, so just create a vdir which points to that
..EXE and set the vdir to append Footers to all resources within it.

--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//
 
P

Prabhat

David Wang said:
This sounds like a one-off case, so just create a vdir which points to that
.EXE and set the vdir to append Footers to all resources within it.
Hi Thanks for your suggestion. But I have wrote code (in VB DLL) that will
take path fore Source Text File and Source Binary File and Append the Text
to the Binary File at END. I understand that I am modifying a Binary File -
But I know that I am not currupting it.

Thanks for your help
Prabhat
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top