Internet Explorer opens links to .msi files as text in a new tab

That function does prevent IE from detecting mime types, which is why IE opens the file in a new tab rather than downloading it.

Delete the function and see if .msi files are then downloaded.

See MIME-Handling Changes in Internet Explorer – IEBlog – MSDN Blogs