Search code examples
windows-installerinstallshield

InstallShield error 1310 when using "big" external rar file


I have an installShield project that deploys 2 files:

  1. A big rar file (3.5GB)
  2. A 3rd party installation file.

I put both files in "Files and Folders" (under application data).

When I build the project it creates setup.exe and simply put the 2 files in the same folder as the setup and .msi files (and that's OK).

However, when I run the installer it throws an Error: "error 1310, error writing to file data.rar , verify that you have access to that directory"

If I look at the folder that the installer created - it has both files but the rar is in size 0KB (should be 3.5GB). The second file is in it normal size.

It happens even if I start the installer as administrator.

How can I solve it?

Thanks, Noam


Solution

  • This is a Microsoft limitation with Windows 7 and the MSI technology. If you include a file that is over 2GB in size you will get this error when trying to install. Please try the following possible workaround to copy your 2+ GB file to the target machine:

    1. In the Support Files > Advanced Files view, Add your file under the Disk1 folder
    2. Create a custom action that would copy this file to the target location. The Disk1 folder can be referenced as SourceDir. Note that the release would have to be built uncompressed for SourceDir to resolve to the Disk1 folder. Building an uncompressed setup is also a requirement if you include a file that is larger than 2GB since Microsoft's cab extraction utility has this size limit
    3. Remove the file from your component Basically, rather than installing the file as part of a component, you would create a custom action that would copy the file from the source location (disk) into the target folder. If using an InstallScript custom action, the function XCopyFile can be used. In order to get the value of SourceDir and INSTALLDIR and use them in InstallScript custom action, you would need to use the MsiGetProperty function.