Repackaging Large Applications from a Packager's Perspective
When deploying software in enterprise environments, handling large installations can be challenging due to inherent limitations in the Windows Installer system.
This article explores effective strategies for managing large file distributions, especially when the limitations of MSI and associated Cabinet (CAB) files pose a challenge.
After running a repackaging operation, you might encounter a problem: the resulting package could exceed the MSI limit and associated Cabinet (CAB) file.
We discuss how to overcome the MSI file size limitation from a developer's
perspective in this
article!
Understanding MSI and CAB File Limitations
The Windows Installer technology uses CAB files to package installation data. However, both formats have significant size restrictions that can impede the deployment of large applications:
- CAB Maximum File Size: The maximum size for a single CAB file is 2 GB. This limit is due to the CAB file format specifications.
- Installer Size Limitations:
1. An MSI package with embedded resources is capped at 2 GB
2. An executable installer (EXE) with embedded resources cannot exceed 4 GB. This is a restriction imposed by Windows.
When conducting a repackaging operation, industry best practices dictate that the process should exclusively capture the intended application, without including extraneous software.
This focused approach ensures the integrity and purity of the package, allowing for a cleaner and more reliable installation.
To ensure a successful application installation and subsequent operations, follow these steps:
- Review the Control Panel in a clean environment post-application deployment. From there, identify any additional runtimes such as the Redistributable for Visual Studio, .Net Runtime, etc. that the application might install.
- Pre-install these required runtimes in the repackaging VM to prepare the initial state of the machine.
- Establish a routine check for any changes in the .Net version or feature activation (if you suspect the setup might apply these changes) that might occur during the application installation. This step is crucial as it ensures the compatibility and functionality of the software.
- Configure Dependencies: When the original software package depends on certain runtimes being present on the target machine, these dependencies must be correctly configured before initiating the repackaging process. This preparation helps avoid installation errors and ensures the repackaging operation is successful.
If the resulting package still exceeds the MSI limitations, there are two options for managing large installations.
Strategies for Managing Large Installations
Over the years, two main approaches have emerged to overcome the size constraints of MSI and CAB files. Each strategy has its advantages and drawbacks:
Option1: Multiple Features with External CABs
- Approach: Divide the installation into multiple features, each associated with its own external CAB file rather than embedding them within the MSI.
- Advantages: Reduces the size of the primary installer and allows for modular installation.
- Downsides: Increases the complexity and preparation time for the MSI package. Managing multiple components can also complicate installation logistics and updates.
In the Builds view from Advanced Installer, you can select the Package Type and the Archive option that should be used for packaging files:
In the Organization view, you can create additional features and group components accordingly.
Option 2: Single Feature with All Files External (not in a CAB)
- Approach: Keep a single installation feature and place all necessary large files outside the MSI without using CAB files.
- Advantages: Simplifies the MSI structure and potentially reduces the issues with file size limitations.
- Downsides: Increases the overall download time and distribution
complexity, particularly in environments like SCCM (System Center Configuration
Manager). However, this method works well with Intune because it compresses
everything into a single .intunewin file.
See the Complete Guide to Deploying Win32 Applications via Microsoft Intune article for more information.
Practical Implementation: A Case Example
Another strategy has proven more efficient for scenarios requiring the distribution of large files, is wrapping the packages and the avaialble options are:
- PowerShell App Deployment Toolkit (PSADT)
- Generate .intunewin file if packages are distributed through the Intune
For generating .intunewin file or wrapping packages with PSADT
and mony other features we recommend using PacKit.
Conclusion
While there is no one-size-fits-all solution for managing large installations in Windows environments, the strategies discussed provide flexible and efficient options for IT administrators.
By understanding the limitations of MSI and CAB files and choosing the right approach for your organizational needs, you can streamline the deployment process and ensure a successful installation experience for large applications.
Recommended article: Best Practices for
Application Packaging: Integrating PacKit into Your Workflow.