Question

I have a deployment project built with Visual Studio 2008 that fails to install. It's using the default GUI. The error occurs when it transitions to the Progress page. The GUI error message is:

Error reading from file F:\Packages\Test\Release\Test.msi. Verify that the file exists and that you can access it.

If I run the MSI from the command line with /l*, I get a lot of errors about GUI elements being incorrectly sized, e.g.:

DEBUG: Error 2826: Control Line1 on dialog WelcomeForm extends beyond the boundaries of the dialog to the right by 3 pixels The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2826. The arguments are: WelcomeForm, Line1, to the right

I also get a more verbose version of the error displayed at runtime:

MSI (c) (08:EC) [17:06:27:026] Product: Test -- Error 1305. Error reading from file F:\Packages\Test\Release\Test.msi. System Error 1008. Verify that the file exists and that you can access it.

Other MSI files work on this machine with the same user account, which is a member of the local Administrators group. The entire Release\ folder has SYSTEM set to Full Control. Both C:\WINDOWS\TEMP and C:\Documents and Settings\username\Local Settings\Temp have SYSTEM set to Full Control.

The PC is running Windows XP SP2 32-bit, with plenty of RAM and disk space available.

Was it helpful?

Solution

I was experiencing the SUBST problem mentioned in the comments on this blog post: http://richardsleegers.blogspot.com/2006/04/error-1305-error-reading-from-file-msi.html

The F: drive was mapped to C:\F_Drive using SUBST. Running the MSI file from F:\Packages\Test failed every time. Running it from C:\F_Drive\Packages\Test worked. This is an acceptable workaround for my testing purposes. This is for some embedded software that will never have to deal with SUBST on production hardware.

The error occurs because MSI packages run under the msiexec service, which uses the LocalSystem account by default, and SUBST mappings are specific to each user.

As an alternative to SUBST, you can create a DOS device mapping in the registry for all users, including LocalSystem, to access the same mapping:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices]
"F:"="\\??\\C:\\F_Drive"

OTHER TIPS

The control error can be ignored. The bottom line control is bigger than its dialog so it looks better.

Usually the reading from file error is encountered when another process has an open handle to the MSI. Make sure that your MSI is not opened with Orca and is not being used by Visual Studio. You can also try a reboot before launching the MSI.

Also, make sure that you don't use a custom action which opens a handle to the MSI database on disk.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top