Can I force Mozilla to download an msi file?

Discussion in 'HTML' started by Frank, Dec 11, 2003.

  1. Frank

    Frank Guest

    I have a page that requires Name and Email before you click on a
    Download button, which then redirects you to a ".msi" file. (Using
    <input type="hidden" name="outputURL"
    value="http://www.location.com/filename.msi">

    Doing this with Internet Explorer gives you a prompt asking you if you
    want to save the file. But if you use Mozilla, it just loads the .msi
    file into the browser window as if it were text.

    Is there a way I can set up the page so Mozilla also prompts you for
    download instructions instead of loading the code into the window?

    Thanks in advance for any clues.

    - Frank
    Frank, Dec 11, 2003
    #1
    1. Advertising

  2. Frank

    Michel Guest

    Do you have the option to zip/tar/rar the files?
    Those would prompt for save

    Regards,

    Michel;

    "Frank" <> wrote in message
    news:0A1Cb.7814$...
    > I have a page that requires Name and Email before you click on a
    > Download button, which then redirects you to a ".msi" file. (Using
    > <input type="hidden" name="outputURL"
    > value="http://www.location.com/filename.msi">
    >
    > Doing this with Internet Explorer gives you a prompt asking you if you
    > want to save the file. But if you use Mozilla, it just loads the .msi
    > file into the browser window as if it were text.
    >
    > Is there a way I can set up the page so Mozilla also prompts you for
    > download instructions instead of loading the code into the window?
    >
    > Thanks in advance for any clues.
    >
    > - Frank
    >
    Michel, Dec 11, 2003
    #2
    1. Advertising

  3. Frank

    SeeSchloss Guest

    Le 11/12/2003, "Frank" a écrit cet amas de lettres :
    > I have a page that requires Name and Email before you click on a
    > Download button, which then redirects you to a ".msi" file.
    > (Using <input type="hidden" name="outputURL"
    > value="http://www.location.com/filename.msi">
    >
    > Doing this with Internet Explorer gives you a prompt asking you
    > if you want to save the file. But if you use Mozilla, it just
    > loads the .msi file into the browser window as if it were text.
    >
    > Is there a way I can set up the page so Mozilla also prompts you
    > for download instructions instead of loading the code into the
    > window?
    >
    > Thanks in advance for any clues.


    That's because your server sends it as text/plain or
    something like that.
    Mozilla loads files depending on the server reply, whereas
    IE (tries to) guess itself what it should do.
    The server probably doesn't know what an msi file is, if it
    is Apache, you should try to find a mean to send the
    correct headers for this type of files in the doc (hmm...
    somewhere on http://apache.org :p). Maybe in .htaccess
    files if you can't directly access its configuration.

    But I think you won't be able to change this only by
    changing things in your html code.

    --
    SeeSchloß - http://www.seeschloss.net
    SeeSchloss, Dec 11, 2003
    #3
  4. Frank

    Chris Harris Guest


    > I have a page that requires Name and Email before you click on a
    > Download button, which then redirects you to a ".msi" file. (Using
    > <input type="hidden" name="outputURL"
    > value="http://www.location.com/filename.msi">
    >
    > Doing this with Internet Explorer gives you a prompt asking you if you
    > want to save the file. But if you use Mozilla, it just loads the .msi
    > file into the browser window as if it were text.
    >
    > Is there a way I can set up the page so Mozilla also prompts you for
    > download instructions instead of loading the code into the window?


    I ran into this problem the other day, or rather my wife did whilst shopping
    !! She was using Konqueror, I then tried Mozilla and Galeon (out of
    curiosity) and niether of them would handle the file either. I had to spark
    up IE, under win4lin, to place the order, and keep her happy!

    In my case the file was a script that simply produced a dropdown box that
    enabled you to select the country as part of the ship-to address. It should
    have just been a list box in the page. If you application is doing something
    similar I suggest that you put the object on the page and not in a separate
    window.

    Chris
    Chris Harris, Dec 11, 2003
    #4
  5. Frank

    Frank Guest

    > Do you have the option to zip/tar/rar the files?
    > Those would prompt for save


    Good idea for a work-around. I'll do this if I can't get my hosting
    company to modify their server settings. Thanks Michel.
    Frank, Dec 11, 2003
    #5
  6. Frank

    Frank Guest

    Thanks SeeSchloß - I'm coming to the same conclusion, that it has to be
    controlled at the server. I'll contact my host.
    Frank, Dec 11, 2003
    #6
  7. Frank

    Frank Guest

    Good point, thanks Chris. That's along the lines of another possible
    work-around that I was considering - i.e, instead of serving up the msi
    file directly, have the Download button load a new web page (in the same
    window) that shows a simple hyperlink to the msi file. At least that
    way I could include instructions to right-click and select "Save link
    target as".
    Frank, Dec 11, 2003
    #7
  8. Frank

    Frank Guest

    Thanks to everyone for pointing me in the right direction. The problem
    is now solved, thanks finally to the following advice from my hosting
    company's chief guru:

    Create a file named ".htaccess" in the top directory of your
    document root with the following contents:

    AddType application/octet-stream .msi

    This should solve the problem. (The server will then present
    any file that ends with a ".msi" extension as being of MIME type
    "application/octet-stream".)

    Worked perfectly.
    Frank, Dec 11, 2003
    #8
  9. Frank wrote:

    > AddType application/octet-stream .msi


    Arguably this would have been better:

    AddType application/x-msi .msi

    According to Google, this seems to be the commonly used MIME type.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
    Toby A Inkster, Dec 11, 2003
    #9
  10. Chris Harris wrote:

    > I ran into this problem the other day,


    For future reference Opera 7 has a feature (which can be toggled on and
    off in Preferences) that allows it to second guess MIME types in an
    MSIE-like manner.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
    Toby A Inkster, Dec 11, 2003
    #10
  11. Frank

    Frank Guest

    Thanks Toby! I'll try it.
    Frank, Dec 11, 2003
    #11
  12. Frank

    A Hess Guest

    Frank wrote:

    > Good point, thanks Chris. That's along the lines of another possible
    > work-around that I was considering - i.e, instead of serving up the msi
    > file directly, have the Download button load a new web page (in the same
    > window) that shows a simple hyperlink to the msi file. At least that
    > way I could include instructions to right-click and select "Save link
    > target as".
    >


    I know I'm in this thread a bit late, but when this happens to me, I
    just goto "File -> Save Page As" then it saves where and how I like it,
    normally.

    --
    This message has been brought to you by the language C and the number F.
    A Hess, Dec 12, 2003
    #12
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark Olbert

    MIME Type for MSI Download

    Mark Olbert, Jan 15, 2005, in forum: ASP .Net
    Replies:
    9
    Views:
    9,425
    Mark Olbert
    Jan 16, 2005
  2. Steve C. Orr [MVP, MCSD]
    Replies:
    0
    Views:
    1,588
    Steve C. Orr [MVP, MCSD]
    Mar 7, 2005
  3. Kele
    Replies:
    0
    Views:
    2,783
  4. Replies:
    0
    Views:
    405
  5. Roberto
    Replies:
    4
    Views:
    109
    Roberto
    Apr 6, 2004
Loading...

Share This Page