By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,485 Members | 1,031 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,485 IT Pros & Developers. It's quick & easy.

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

P: n/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.ex e"
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
Jul 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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

"Avi" <av******@optonline.net> wrote in message
news:ab**************************@posting.google.c om...
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.ex e" 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

Jul 19 '05 #2

P: n/a
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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.