Friday, April 28, 2006

Error 1305: Error Reading from File: *.MSI

I was trying to install MySQL on a new server, and I kept getting Error 1305: Error Reading from File: <filename.MSI>. I searched for the error message and most entries pointed to CD problems or MDAC corruption. I was installing a downloaded file, so the CD access problems did not apply. I applied the latest MDAC upgrades (in this case 2.81), but that did not help either. I even used the CSREPAIR tool which cleans up MDAC and JET problems, but that did not help, nor did the Windows Installer Cleanup tool.

I re-downloaded the file, fearing corruption, but that did not help. When I tried to install Apache which was also an .MSI installer, and it too had the same problem, there was something else going on.

It turned out to be a permissions problem. I had created a shared folder with access only by users. I probably explicitly removed all other admin/system accounts, and therein lied the problem. By removing SYSTEM, when the installer tried to run from account which did have access to the file and started to run it, it turned the file over to a system account "Windows Installer" which did not.

To solve the problem, I gave the root folder SYSTEM read access, and then the install was able to complete successfully. The subfolders inherited the needed permission.

Edited: Oct, 2007
For a different twist, see Stasheg's comment below on copying the file to your Desktop. This method would write the file into a folder with your own permissions. However, if you do not have administrator access, or SYSTEM permissions in your Desktop folder, this may not work.

Edited: Mar, 2008
Another comment suggests "giving SYSTEM full access to the temp directory". Of course, there are often several, so try %WINDIR%\Temp and %USERPROFILE%\Local Settings\Temp.

Edited: Mar, 2009
As Meiki has said, a SUBST drive can cause a similar problem. I too have run into a printer driver which fails to save to a SUBST drive because it cannot see it using SYSTEM credentials. So in that case, running it from the original location or copying to an accessible folder should help.