Can I force Mozilla to download an msi file?

F

Frank

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
 
M

Michel

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

Regards,

Michel;
 
S

SeeSchloss

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

Chris Harris

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
 
F

Frank

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

Frank

Thanks SeeSchloß - I'm coming to the same conclusion, that it has to be
controlled at the server. I'll contact my host.
 
F

Frank

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".
 
F

Frank

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

Toby A Inkster

Frank said:
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.
 
T

Toby A Inkster

Chris said:
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.
 
A

A Hess

Frank said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,438
Messages
2,571,699
Members
48,796
Latest member
Greg L.
Top