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

Re: why adodb.strem downloding works for everything but self extracting files? by Ray

Ray
Wed May 05 22:58:29 CDT 2004

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" <avisemah@optonline.net> wrote in message
news:ab052923.0405051929.54110a4b@posting.google.com...
> 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