KNOWN ISSUE: Patching/Repair issues with packages that contain merge modules
| Article:TECH25344 | | | Created: 2005-09-14 | | | Updated: 2008-06-24 | | | Article URL http://www.symantec.com/docs/TECH25344 |
| NOTE: If you are experiencing this particular known issue, we recommend that you Subscribe to receive email notification each time this article is updated. Subscribers will be the first to learn about any releases, status changes, workarounds or decisions made. |
Problem
When creating a patch file, the error “Cannot execute MakeCab.exe,” or Windows Installer error 1334, may occur when attempting to build or apply a patch between two .msi installations. Often both .msi files contain merge modules, and the new version contains a file that is not present in the previous versions.
Environment
Wise for Windows Installer 6.x
Wise Installation Express/Studio 7.x
Wise Package Studio 5.x, 6.x, 7.x
Cause
The compiler is sequencing a new file ahead of the merge module files in the file table. This causes the resulting .cab files to be incompatible with the previous versions for patch purposes.
Solution
As a workaround, the install files can be manipulated to correct the file sequence and .cab inclusion. The goal is to place the new files from the newest revision of the .MSI into their own .cab file. This workaround will have to be performed every time the .wsi is compiled, because the File, Media, and .cab configuration will be overwritten when it's compiled. Because of this it is not recommended that you perform this workaround and generate a patch until you have your current installation is finalized.
To finish this workaround you will need Orca, the standard Windows Installer database editor, and MakeCab.exe. Both are available with the Windows Installer Software Development Kit (SDK).
For the purposes of the workaround example, Setup1.0.msi will be the previous version .MSI; Setup1.1.msi will be the new version. Newfile1.exe will be the new file added to Setup1.1.msi.
Build a new .cab file
The first task will be to build a new .cab file that contains the new files added to your installation
To make a .cab file that contains a single file, do the following:
Execute: MakeCab.exe “c:\path\to\Newfile1.exe” “c:\path\to\Newcab.cab”
To make a .cab file that contains multiple files:
- Create a new text file named Newcab.ddf.
- Insert the following template information into the file:
; DDF File to Use with MakeCab.exe
.Set CabinetNameTemplate=Newcab*.CAB
.Set CabinetName1=Newcab.CAB
.Set ReservePerCabinetSize=8
.Set MaxDiskSize=CDROM
.Set CompressionType=MSZIP
.Set InfFileLineFormat=(*disk#*) *file#*: *file* = *Size*
.Set InfFileName=Newcab.If
.Set RptFileName=Newcab.RPT
.Set InfHeader=
.Set InfFooter=
.Set DiskDirectoryTemplate=.
.Set Compress=ON
.Set Cabinet=ON
- After the template text, add lines containing paths to your new files, and the name they will take in the .cab file. Make note of the order of the files in the list as it will be needed when adjusting sequence numbers.
"c:\Path\to\Newfile1.exe" Newfile1.exe
“c:\Path\to\Newfile2.exe” Newfile2.exe
- Save and exit Newcab.ddf.
- Execute: MakeCab.exe /F Newcab.ddf
Add the new .cab to the .msi
- Make a backup copy of your .msi before making these changes.
- Open Setup1.1.msi in Orca.
- Select the Cabs table. You will see the current .cab files embedded in the .msi.
- Right-click in the table rows and choose Add Row.
Name: Newcab.cab
Data: Browse and select Newcab.cab
Finished example:
|
Name |
Data |
|
w1.cab |
[Binary Data] |
|
m1.cab |
[Binary Data] |
|
Newcab.cab |
[Binary Data] |
- Save the .MSI. (Do not close Orca yet)
Resequence files and adjust media settings
- In Orca, with your .MSI opened, select the File table.
- You will see your new file listed with existing files and merge module files.
Example:
|
File |
Component |
… |
Sequence |
|
OldFile1.exe |
OldFile1.exe |
|
1 |
|
OldFile2.exe |
OldFile2.exe |
|
2 |
|
NewFile1.exe |
NewFile1.exe |
|
3 |
|
Comctl32ocx.3207D1B4… |
Global_Controls… |
|
4 |
Even though NewFile1.exe was added last, the sequence is incorrect. NewFile1.exe should have a sequence number greater than the merge module file, Comctl32.ocx.
- Decrement the each merge module file’s sequence number by the number of new files you added. In this example, Comctrl32.ocx sequence number should be 3. Change the NewFile1.exe sequence number to the next number available after the merge module file. In this example the new sequence number would be 4.
Finished example:
|
File |
Component |
… |
Sequence |
|
OldFile1.exe |
OldFile1.exe |
|
1 |
|
OldFile2.exe |
OldFile2.exe |
|
2 |
|
NewFile1.exe |
NewFile1.exe |
|
4 |
|
Comctl32ocx.3207D1B4… |
Global_Controls… |
|
3 |
- Select the Media table. You will see the existing .cab, or .cab files listed, as well as sequence ranges.
Example:
|
DiskId |
LastSequence |
… |
Cabinet |
… |
|
1 |
3 |
|
#Cabs.w1.cab |
|
|
2 |
4 |
|
#Cabs.m1.cab |
|
This means that the file with sequence 1 through 3 is stored in w1.cab, and the file with sequence 4 is stored in m1.cab.
- Decrement the LastSequence of each of the existing cabinets by the number of new files that were added. In this example, the LastSequence value for w1.cab will be 2, and m1.cab will be 3.
- Right-click the table rows and choose Add Row.
DiskId: Next available number DiskId number. In this example it would be 3.
LastSequence: The highest sequence number of all the new files you added to the .CAB. In this case, it would be 4.
Cabinet: #Cabs.Newcab.cab (The name of the cab you added to the Cabs table. Case sensitive.)
Finished Example:
|
DiskId |
LastSequence |
… |
Cabinet |
… |
|
1 |
2 |
|
#Cabs.w1.cab |
|
|
2 |
3 |
|
#Cabs.m1.cab |
|
|
3 |
4 |
|
#Cabs.Newcab.cab |
|
- Save the .msi and exit Orca.
- You can now generate and install your patch.
| Source | DEFECT |
| Value | LB 2963 |
| Description | Logged in Littlebuggy (Altiris - Lindon, Plymouth) database |
| Source | DEFECT |
| Value | LB 69126 |
| Description | Logged in Littlebuggy (Altiris - Lindon, Plymouth) database |
Legacy ID
2963
Article URL http://www.symantec.com/docs/TECH25344
Terms of use for this information are found in Legal Notices









Thank you.