Having posted a lot about my activeX experiences and dealing with CAB files and automatic deployment, today was a low point! Today I added more files to our CAB file that will be auto-deployed and came across the error message in the title of this blog. I wasted a lot of time thinking I had mistyped something or done something wrong when I added the new files to the CAB INF file. Finally I found this and was quite stunned.
There appears to be an arbitrary limit of 78 files that you can place in the [Add.Code] section of these INF files. “No work around, by design” are what you will see in the comments from Microsoft. Looks like I’ll need to repackage portions of these files to be deployed in a different manner now that I know this limit exists. Its too bad this limit was NEVER POSTED on the MSDN website that explains how to make a CAB file and how to make an INF file! The left hand and the right hand are not talking.
**UPDATED February 16, 2009 **
The workaround that works for me is to package up groups of related files into one or more silent installer(s). Then you just add the single EXE installer(s) into the cab. Let’s imagine you called the silent installer setup.exe. The INF file has something called hooks. There are 2 types of hooks, one is unconditional the other is conditional. For example an unconditional setup action would look something like:
That will cause the silent installer to execute AFTER extracting files from the CAB file, BEFORE moving them into the Downloaded Program Files folder and BEFORE launching your activeX control. You could additionally pass the install folder to the setup using a special INF file environment variable (which does NOT work from batch files or commandline) like this:
For more info check out msdn