[wix-users] Patch creation issue - Transform stream read/write failure
wix at aledhughes.co.uk
Tue Oct 1 05:50:44 PDT 2019
I'm struggling to create a simple patch for an MSI that updates two text
files. The resulting MSP file fails with the error "Transform stream
read/write failure" when I try to apply it and Orca shows validation
errors if I apply the patch in there.
I'm using Wix 3.11.2 on Win10.
I don't have the original source for the MSI (it was created using
visual studio deployment tool) so this is what I've done:
1. Done an admin install of the original MSI in to a directory "old"
2. Made a full copy of "old" into a another directory - "new".
3. Updated the two small text files in the "new" directory.
4. Used ORCA to update the file sizes in the msi file within "new" in
the File table. Everything else stays the same (file ids, product id,
5. Created a simple patch.wxs file:
<?xml version="1.0" encoding="utf-8"?>
<?define DisplayName="My Product"?>
<?define Description="***" ?>
<?define Comments="" ?>
<?define Manufacturer="My Company" ?>
<Media Id="5000" Cabinet="patch.cab" EmbedCab="yes">
<PatchFamily Id='MyPatchFamily' Version='220.127.116.11'
6. Created wixmst file, compile and link the patch.wsx and run pyro:
torch -p -xo -ax patch\bin "old\installer.msi" "new\installer.msi"
light patch.wixobj -out patch\patch.wixmsp
pyro patch\patch.wixmsp -out patch\patch.msp -t RTM patch\diff.wixmst
7. Installing the original MSI and then apply the patch fails with "This
update package could not be opened. Contact the application vendor to
verify that this is a valid Windows Installer update package." and
"Transform stream read/write failure".
I've tried opening the old MSI up in ORCA and do Transform>Apply Patch,
which it does happily, but there are some oddities:
- In the Media table the LastSequenceId for DiskId=5000 is a negative
number (e.g. -27766).
- If I run ICE validation in orca then it complains about this negative
number and the updated file entries with sequence 5001 & 5002.
It seems the patch is creating an invalid result. I've made patches
before without issue, but I can't understand what is going wrong here.
Any help appreciated!
More information about the wix-users