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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Avi

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

    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.Conten tType ="Applicatio n/exe"
    Response.AddHea der "Content-Disposition:"," attachment;file name=myselfextr ct.exe"
    Set objStream = Server.CreateOb ject("ADODB.Str eam")
    objStream.Open
    objStream.Type = 1
    objStream.LoadF romFile "c:\myselfextrc t.exe"
    Response.Binary Write objStream.Read( )
    objStream.Close
    set objStream = Nothing
    Set objFile = Nothing


    thanks

    Avi
  • Ray at

    #2
    Re: why adodb.strem downloding works for everything but self extracting files?

    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@opton line.net> wrote in message
    news:ab052923.0 405051929.54110 a4b@posting.goo gle.com...[color=blue]
    > 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.Conten tType ="Applicatio n/exe"
    > Response.AddHea der[/color]
    "Content-Disposition:"," attachment;file name=myselfextr ct.exe"[color=blue]
    > Set objStream = Server.CreateOb ject("ADODB.Str eam")
    > objStream.Open
    > objStream.Type = 1
    > objStream.LoadF romFile "c:\myselfextrc t.exe"
    > Response.Binary Write objStream.Read( )
    > objStream.Close
    > set objStream = Nothing
    > Set objFile = Nothing
    >
    >
    > thanks
    >
    > Avi[/color]


    Comment

    • avisemah

      #3
      Re: why adodb.strem downloding works for everything but self extracting files?

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







      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!

      Comment

      Working...