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
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