Alexey Popkov
Posts: 4
Joined: Sat Apr 03, 2021 3:41 pm

A limitation on the project size when creating MSI package with multiple CABs inside?

Hello, I have a problem with building a standalone MSI installer for a project containing 221478 files with an overall size of 5,93 GB using Advanced Installer 18.1. Here are the steps I've performed so far:

   1. I've created a new project using the ".NET Application template", then in the Wizard selected "MSI setup file. A single MSI setup which contains all installation files."
   2. In the project, I've set synchronization of the "Application Folder" with the folder containing my application files.
   3. I’ve pressed the “Build” toolbar button, and after waiting I’ve got an error: my application files can't be put in one CAB archive due to CAB format limitations.
   4. To avoid this error, on the “Builds” page for "DefaultBuild" I've selected the “Advanced CAB layout”, then configured it as on the screenshots below: Maximum CAB size: 50 MB, checked “Compress this CAB for smaller size”.
Image
Image    5. With these settings, I successfully built the project, but generated CAB files were not included in the MSI installer.
   6. Since I need to build a standalone MSI file, I’ve checked the “Include CAB into the MSI database” checkbox on the same page:
Image
But now an attempt to build the project failed with the following output:
Checking builds status
Build required.

[ DefaultBuild ]
Building package:
C:\AppServer\AppServer-dev\build\install\win\Setup Files\Disk1\AppServer.gitignore.msi
Prepare build
Detecting MSI incompatible resources
Preparing files
Creating CAB file(s)
Creating MSI database
Inserting CAB file(s) into MSI
Writing Summary Information
Error calling MSI API: 1627 Method: MsiDatabaseCommit Table: . Extended Error: 1: 2265 2: 3: -2147286767 .
Error details

Build finished because an error was encountered.
Details:
Error calling MSI API: 1627 Method: MsiDatabaseCommit Table: . Extended Error: 1: 2265 2: 3: -2147286767 .

Advanced Installer 18.1 build 4fb1edbd
*** Stack Trace (x86) ***

[0x75c9a8b2] RaiseException()
[0x01e64a2a] -----
[0x00e64935] -----
[0x00e64668] -----
[0x00e791c3] -----
[0x00eaefa3] -----
[0x00e65106] -----
[0x00520000] MODULE_BASE_ADDRESS
   7. I suspected that the reason for the error is that my project is too large, and removed some folders effectively reducing it to 170212 files with an overall size of 5,76 GB. Now I was able to build the project without errors and obtained a standalone MSI file of size 1,99 GB.

Is Advanced Installer limited to have no more than about 170200 files for one project when creating a standalone MSI installer? Is there a way to overcome this limitation?
Catalin
Posts: 6586
Joined: Wed Jun 13, 2018 7:49 am

Re: A limitation on the project size when creating MSI package with multiple CABs inside?

Hello Alexey,

As you have already mentioned, the Operating System does not support CAB files larger than 2GB and thus, no single MSI larger that 2GB can be created.

When you have added 170k files in your project, the size of your MSI was 1.99GB, which is pretty close to the limit I've mentioned above.

The only options are to place the resources outside the MSI package (for instance, you can use the "One CAB archive per feature" option) or to create an EXE setup.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Alexey Popkov
Posts: 4
Joined: Sat Apr 03, 2021 3:41 pm

Re: A limitation on the project size when creating MSI package with multiple CABs inside?

Hello Catalin,

Thank you for the reply.
As you have already mentioned, the Operating System does not support CAB files larger than 2GB ...
This is the reason why I set the option "Maximum CAB size" to 50 MB, as I mentioned in the post (and it is seen on the last two screenshots). During the build 42 CAB files were created, each of them had a size 50.0 MB (except the last with size 12.7 MB). Their overall size was 2,01 GB. Actually, I've also tried to do the same without setting the options "Overwrite the global CAB compress option with:" ▶ "Compress this CAB for smaller size" (they also can be seen on the screenshots), and as a result, I obtained 122 such files with an overall size of 5,94 GB.
... and thus, no single MSI larger that 2GB can be created.
Advanced Installer supports embedding several CAB files into an MSI file, I cover this in great detail in this post:
viewtopic.php?f=1&t=47677#p121694
Hence the 2 GB limitation shouldn't apply to MSI files.
When you have added 170k files in your project, the size of your MSI was 1.99GB, which is pretty close to the limit I've mentioned above.
Yes, but it is the limit for an individual CAB file, not for an MSI file, isn't it? When I open obtained MSI file with the 7-Zip archiver (it allows me to open MSI files), I see inside all my 42 CAB files. I think the 2 GB limitation doesn't apply to MSI files, only to CAB files. Or I'm wrong?
Catalin
Posts: 6586
Joined: Wed Jun 13, 2018 7:49 am

Re: A limitation on the project size when creating MSI package with multiple CABs inside?

Hello Alexey,
Hence the 2 GB limitation shouldn't apply to MSI files.
Yes, but it is the limit for an individual CAB file, not for an MSI file, isn't it? When I open obtained MSI file with the 7-Zip archiver (it allows me to open MSI files), I see inside all my 42 CAB files. I think the 2 GB limitation doesn't apply to MSI files, only to CAB files. Or I'm wrong?
You are indeed right, the limitation here applies to the CAB files inside the MSI database, not the MSI database itself.

However, by this logic, if the CAB files are embedded in the MSI database => the above would also apply to the MSI.

MSI file contains the CAB file, CAB file can have a maximum size of 2GB ==> the MSI will also have a maximum size of 2GB.

Regarding your other thread, I will have to discuss this with our development team.

For the moment, I have run some tests using some large files (e.g. 5x 512MB files to exceed the 2GB limit) and I was able to reproduce the error you have mentioned by following the steps you have provided, therefore I am not so sure the error is related to the number of files as you have mentioned.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”