CAB files not downloading on IE Mobile

12 Jul 2006

I’ve been trying to enhance my stock of software on my Moto Q with limited success. One of the biggest problems I’ve had was downloading cab files directly through the phone. I can’t use ActiveSync to transfer files to my phone because A) It sucks and B) I use Linux, not Windows. So I’ve got to download them directly.

About 70% of the .cab files I try to download are displayed in the browser window (really pretty) while the other 30% give me a handy prompt with ‘would you like to download and install this file?’

The solution seems to be in changing the mime-type on the server. To do this I’ve had to use my Linux box to download the file and upload it to one of my sites (I use just ‘cause it’s the easiest to type on a tiny keyboard). Then I have to modify the .htaccess file to make sure it gives the phone the right mime-type.

My working .htaccess file (well, a portion of it):

AddType application/x-cab-compressed cab

Voila - and it’s done. Now I browse to my site, download the file, and crapware spreads all over my phone.
As an added bonus, this allows me to download files straight to my Moto Q using the crappy-ass version of IE that it ships with. Normally file downloads are disallowed but an exception is made for cab files. If you use the right mime type and have a .cab extension you can download any file. It will attempt to execute the file once it’s downloaded but you just have to ignore it’s error message and then find the file in C:\My Documents.

  • Robert said: AMAZING!!!!!!! I was looking for this everywhere because I want to deploy a CAB file via a website.
  • Luke said: Thanks!
  • Lev said: Thanks, mime-types again become very important.
  • John Huffman said: Thanks!!! I was searching all over to figure out how to do this. Everyone says it just works, but they ignore the MIME part of the problem. Now my cab files happily deploy 8-)

Please if you found this post helpful or have questions.