Difficulty in Deploying MSI Package from a Page

Mar 19, 2009 at 10:00 PM
Edited Mar 19, 2009 at 10:11 PM
Hi All,

Has anyone tried to deploy an MSI package (Windows Installer) from a page?

I've uploaded my .msi as a file and the link to the file is working. But when the user clicks on the link and saves the .msi file to his local drive the OS loses the .msi extension.

My work-around is to tell the user to save the file as Setup.msi but I really shouldn't have to.

here is the link to my page: http://artisticpinoy.com/ArtisticPinoy/admin/Pages/page/Free-Image-Editing-Software.aspx

Many thanks!


Coordinator
Mar 19, 2009 at 11:41 PM
I'm guessing this is a problem in IE6?  Firefox and IE7 save the file with the correct extension.  Although Firefox and IE7 actually save the file name as 2009_3_Setup.msi.  The download link is file.axd?file=2009\3\Setup.msi.  It turns out the backslashes is causing the problem in IE6.  Plus, it would be better if the file downloaded would be named Setup.msi, rather than 2009_3_Setup.msi (as it is in Firefox and IE7).

You can modify the FileHandler.cs file (in the BE core) so it passes Setup.msi to the browser, rather than 2009\3\Setup.msi.  This also fixes the problem in IE6 where it's not adding any extension to the downloaded file.  The part bolded below is what should be changed.  info.Name replaces fileName.

context.Response.AppendHeader("Content-Disposition", "inline; filename=\"" + info.Name + "\"");
Mar 20, 2009 at 3:37 PM
Thanks Ben!

Yes, I have verified that the problem is in IE6.

IE 7.0.5730.13C0 and FireFox 3.0.7 save the file with the correct extension.