why adodb.strem downloding works for everything but self extracting files?

A

Avi

hi,

Can anyone tell me what the problem is and how to solve it

The following piece of code resides on an asp page on the server and
is used to download files from the server to the machine accessing the
abobe mentioned asp page. It WORKS for every type of file when I
change the content type according to the file type, but it won't work
with self extracting files. When an end user downloads a self
extracting file by accessing the code, the whole file is downloaded on
its entire size, but trying to run the self extracting file by double
clicking on it yields a momentary DOS-like black screen and not what
is expected -- that the file start running by unzipping itslef and
then executing some setup or install file. Further more, as something
that migh give the experts of you a hint, even though the file is
downloaded on all its bytes, the icon associated with the file on the
server DOES NOT appear with the downloaded file.

Response.ContentType ="Application/exe"
Response.AddHeader "Content-Disposition:","attachment;filename=myselfextrct.exe"
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open
objStream.Type = 1
objStream.LoadFromFile "c:\myselfextrct.exe"
Response.BinaryWrite objStream.Read()
objStream.Close
set objStream = Nothing
Set objFile = Nothing


thanks

Avi
 
R

Ray at

I don't see anything wrong with your code. I'd try disabling any AV
software or any sort of content filtering you have installed on the client
and/or the server and see if that makes a difference.

Ray at home
 
A

avisemah

Hi Ray,

thanks for the prompt reply. I do not have any content-filtering
software (as far as I can tell). I only have a Netgear router that
serves as a firewall, just like any other router. In any case, I built
two asp pages using the code I provided in my previous post, each of
those asp pages contain the same code, and the only difference between
the two is the file name targeted to be downloaded:

The first url corresponds to downloading a zip file with .zip extension
which, once downloaded, can be unzipped and run ( there is onlt one exe
file inside that displays 'hello world' message). The second url
exemplifies the problem; it contains the same zip file but as a
self-extract file that does not work as expected once downloaded. The
downloading person, once double clicking on the file, triggers automatic
extraction of the zip file into some temporary file followed by
execution of the .exe file embedded therein ( the same 'hello world'
message file).


http://24.191.235.110:40002/dowl1.asp

http://24.191.235.110:40002/dowl2.asp


Please note that the downloaded self-extracted file works perfectly in
in the orignal machine where it was created, and, as I mentioned before,
it bears an icon different than the one associated with it after being
downloaded.

I hope those urls can make any difference in terms of figuring out the
problem.

thanks

Avi
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top