Of course. I've been doing this on a very small 3 file install to test
proof of concept stuff. There are 2 files that I am using, Product.wxs and
Patch.wxs, both should be fairly self explanatory. When creating the 2
versions of the product a wixout with the -bf option in light is used and
then light is ran again to create the msi. Torch is ran against the
resulting wixpdb files to create the wixmst. Pyro is then ran against the
wixmst and the wixmsp from the patch file.
Thank you again for your help.
Matt
Command line for creating product (batch script):
candle Product.wxs -dVersion=%1 -out Prod%1.wixobj
light Prod%1.wixobj -xo -dVersion=%1 -out %1\Prod%1.wixout
light %1\Prod%1.wixout -out %1\Prod%1.msi
Command line for creating patch (batch script):
torch -xi -p -t patch %1\Prod%1.wixpdb %2\Prod%2.wixpdb -out
%1to%2diff.wixmst
candle patch.wxs -dbase=%1 -dtarget=%2 -out Patch%1to%2.wixobj
light Patch%1to%2.wixobj -out Patch%1to%2.wixmsp
pyro Patch%1to%2.wixmsp -out %1to%2.msp -t RTM %1to%2diff.wixmst
Product.wxs:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="376DC5D6-C67B-4CE1-A2DD-97FE4992235A"
Name="WiX Patch Example Product"
Language="1033"
Version="1.0.$(var.Version)"
Manufacturer="Dynamo Corporation"
UpgradeCode="D3B1F084-3B3E-4C8D-8017-A3BD418D31E1">
<Package Description="Installs a file that will be patched."
Comments="This Product does not install any executables"
InstallerVersion="301" Compressed="yes" />
<Media Id="1" Cabinet="product.cab" EmbedCab="yes" />
<FeatureRef Id="SampleProductFeature"/>
<PatchCertificates>
<DigitalCertificate Id="TestCert" SourceFile="signcert.spc"/>
</PatchCertificates>
<Property Id="ALLUSERS" Value="1" />
<Property Id="InstanceId" Value="Original" />
<InstanceTransforms Property="InstanceId">
<Instance Id="Instance2"
ProductCode="{48F7E3D3-4291-45b0-AA5E-8A78337D95FF}" ProductName="WiX Patch
Example Product 2" />
</InstanceTransforms>
<CustomAction Id="SetInstallDir" Property="INSTALLDIR"
Value="[INSTALLDIR][InstanceId]" Execute="immediate" />
<InstallExecuteSequence>
<Custom Action="SetInstallDir" Before="CostInitialize">NOT
Installed</Custom>
</InstallExecuteSequence>
</Product>
<Fragment>
<Feature Id="SampleProductFeature" Title="Sample Product Feature"
Level="1">
<ComponentRef Id="File1.txt" />
<ComponentRef Id="File2.txt" />
<ComponentRef Id="File3.txt" />
</Feature>
</Fragment>
<Fragment>
<DirectoryRef Id="INSTALLDIR">
<Component Id="File1.txt"
Guid="{151A4C3E-436D-489F-BD61-021B213078E6}" DiskId="1">
<File Id="File1.txt" Name="File1.txt"
Source="$(var.Version)\File1.txt" />
</Component>
</DirectoryRef>
</Fragment>
<Fragment>
<DirectoryRef Id="INSTALLDIR">
<Component Id="File2.txt"
Guid="{C3895CCD-4919-4601-8C30-5AF9348F9AA1}" DiskId="1">
<File Id="File2.txt" Name="File2.txt"
Source="$(var.Version)\File2.txt" />
</Component>
</DirectoryRef>
</Fragment>
<Fragment>
<DirectoryRef Id="INSTALLDIR">
<Component Id="File3.txt"
Guid="{6CAE947D-5EFF-4198-BF67-DCD0C03FB28A}" DiskId="1">
<File Id="File3.txt" Name="File3.txt"
Source="$(var.Version)\File3.txt" />
</Component>
</DirectoryRef>
</Fragment>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder" Name="PFiles">
<Directory Id="INSTALLDIR" Name="Patch Sample Directory" />
</Directory>
</Directory>
</Fragment>
</Wix>
Patch.wxs:
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Patch AllowRemoval="yes"
Manufacturer="Practice Partner" DisplayName="Test Patch -
$(var.base) to $(var.target)" Description="Patch for Testing"
Classification="Update">
<Media Id="5000" Cabinet="RTM.cab">
<PatchBaseline Id="RTM">
<Validate ProductId="no" UpgradeCode="no" ProductVersion="Major"
ProductVersionOperator="GreaterOrEqual"/>
</PatchBaseline>
</Media>
<PatchFamily Id="TestPatchFamily" Version="1.0.$(var.target)"
Supersede="no">
<ComponentRef Id="File1.txt"/>
<ComponentRef Id="File2.txt"/>
<ComponentRef Id="File3.txt"/>
</PatchFamily>
</Patch>
</Wix>
On Fri, Nov 21, 2008 at 12:30 PM, John Nannenga <[EMAIL PROTECTED]
> wrote:
> Is this something you can share for debugging purposes?
>
>
>
>
>
> *From:* Matt Ziegler [mailto:[EMAIL PROTECTED]
> *Sent:* Friday, November 21, 2008 12:42 PM
> *To:* Windows Installer XML toolset developer mailing list
>
> *Subject:* Re: [WiX-devs] Multiple instance patches
>
>
>
> I was hoping to use the pure WiX patches routine as well as try to be able
> to change a patch's target on the command line, but I'll settle to get it
> working in the first place and then I'll go from there :).
>
> I did create a patch using the <TargetProductCode /> element using
> MsiMsp.exe. The patch now runs and patches the base installation just fine
> but when it goes to patch the second instance I get a 1642 error. The
> output from the log file is below (one finally generated).
>
> Any help is greatly appreciated.
>
> Thanks
>
> Matt
>
> MSI (c) (F0:44) [10:32:38:195]: Original package ==>
> C:\WINDOWS\Installer\16f38b31.msi
> MSI (c) (F0:44) [10:32:38:195]: Package we're running from ==>
> C:\WINDOWS\Installer\16f38b31.msi
> MSI (c) (F0:44) [10:32:38:195]: APPCOMPAT: looking for appcompat database
> entry with ProductCode '{48F7E3D3-4291-45B0-AA5E-8A78337D95FF}'.
> MSI (c) (F0:44) [10:32:38:195]: APPCOMPAT: no matching ProductCode found in
> database.
> MSI (c) (F0:44) [10:32:38:195]: Detected that this product uses a multiple
> instance transform.
> MSI (c) (F0:44) [10:32:38:195]: MSCOREE not loaded loading copy from
> system32
> MSI (c) (F0:44) [10:32:38:195]: Applying multiple instance transform
> ':Instance2'...
> MSI (c) (F0:44) [10:32:38:195]: Looking for storage transform: Instance2
> <snip />
> MSI (c) (F0:44) [10:32:38:195]: Original patch ==>
> C:\practice_partner\Installers\SiteInstaller\Patch testing\small
> test\patch.msp
> MSI (c) (F0:44) [10:32:38:195]: Patch we're running from ==>
> C:\DOCUME~1\mziegler\LOCALS~1\Temp\459eb18.msp
> MSI (c) (F0:44) [10:32:38:211]: Opening existing patch
> 'C:\WINDOWS\Installer\44b1e86.msp'.
> MSI (c) (F0:44) [10:32:38:211]: SequencePatches starts. Product code:
> {48F7E3D3-4291-45B0-AA5E-8A78337D95FF}, Product version: 1.0.1, Upgrade
> code: {D3B1F084-3B3E-4C8D-8017-A3BD418D31E1}, Product language 1033
> MSI (c) (F0:44) [10:32:38:211]: PATCH SEQUENCER: verifying the
> applicability of minor upgrade patch
> C:\practice_partner\Installers\SiteInstaller\Patch testing\small
> test\patch.msp against product code: {48F7E3D3-4291-45B0-AA5E-8A78337D95FF},
> product version: 1.0.1, product language 1033 and upgrade code:
> {D3B1F084-3B3E-4C8D-8017-A3BD418D31E1}
> MSI (c) (F0:44) [10:32:38:211]: PATCH SEQUENCER: minor upgrade patch
> C:\practice_partner\Installers\SiteInstaller\Patch testing\small
> test\patch.msp is not applicable.
> MSI (c) (F0:44) [10:32:38:211]: SequencePatches returns success.
> MSI (c) (F0:44) [10:32:38:211]: Final Patch Application Order:
> MSI (c) (F0:44) [10:32:38:211]: Other Patches:
> MSI (c) (F0:44) [10:32:38:211]: Unknown\Absent:
> {0148E385-C0F9-4C51-846B-A6B393868862} -
> C:\practice_partner\Installers\SiteInstaller\Patch testing\small
> test\patch.msp
> The upgrade patch cannot be installed by the Windows Installer service
> because the program to be upgraded may be missing, or the upgrade patch may
> update a different version of the program. Verify that the program to be
> upgraded exists on your computer an
> d that you have the correct upgrade patch.
> C:\WINDOWS\Installer\16f38b31.msi
> MSI (c) (F0:44) [10:32:38:211]: Product: WiX Patch Example Product 2 -
> Update '{0148E385-C0F9-4C51-846B-A6B393868862}' could not be installed.
> Error code 1642. Additional information is available in the log file
> C:\practice_partner\Installers\SiteInstaller\Patch testing\small
> test\patch2.log.
>
> MSI (c) (F0:44) [10:32:38:211]: Windows Installer installed an update.
> Product Name: WiX Patch Example Product 2. Product Version: 1.0.1. Product
> Language: 1033. Update Name: {0148E385-C0F9-4C51-846B-A6B393868862}.
> Installation success or error status: 1642.
>
> MSI (c) (F0:44) [10:32:38:211]: Note: 1: 1708
> MSI (c) (F0:44) [10:32:38:211]: Product: WiX Patch Example Product 2 --
> Installation failed.
>
> MSI (c) (F0:44) [10:32:38:211]: Windows Installer installed the product.
> Product Name: WiX Patch Example Product 2. Product Version: 1.0.1. Product
> Language: 1033. Installation success or error status: 1642.
>
> On Thu, Nov 20, 2008 at 3:04 PM, John Nannenga <
> [EMAIL PROTECTED]> wrote:
>
> In your patch generation you need to target the patch for all the product
> codes [instances] you want it to be applicable to.
>
>
>
> <TargetProductCode Id="PRODUCT_CODE_GUID"/>
>
> <TargetProductCode Id="PRODUCT_CODE_GUID_INSTANCE1"/>
>
> <TargetProductCode Id="PRODUCT_CODE_GUID_INSTANCE2"/>
>
>
>
> Etc…
>
>
>
>
>
>
>
>
>
>
>
> *From:* Matt Ziegler [mailto:[EMAIL PROTECTED]
> *Sent:* Thursday, November 20, 2008 3:50 PM
> *To:* [EMAIL PROTECTED]; [email protected]
> *Subject:* Re: [WiX-devs] Multiple instance patches
>
>
>
> Any insight from anyone?
>
> On Wed, Nov 19, 2008 at 2:58 PM, Matt Ziegler <[EMAIL PROTECTED]> wrote:
>
> I've been playing around with installing multiple instances of an
> application used the <InstanceTransforms /> element, works quite well. I'm
> trying to create a patch between 2 versions and apply that one patch to
> multiple installed instances and according to
> http://msdn.microsoft.com/en-us/library/aa369528(VS.85).aspx<http://msdn.microsoft.com/en-us/library/aa369528%28VS.85%29.aspx>it
> is possible to do this by running the patch from the command line and
> passing in the product id of the installed instance you want to patch. I
> have yet to be able to get a patch to install to a second instance
> correctly, installing to the base instances works just fine. The error
> message I get is:
>
> "The upgrade patch cannot be installed by the Windows Installer service
> because the program to be upgraded may be missing, or the upgrade patch may
> update a different version of the program."
>
> The command line executed is: msiexec /update 1to2.msp /n
> {48F7E3D3-4291-45b0-AA5E-8A78337D95FF}
> There is no log created even with /l*v
>
> I included a <Validate /> element wondering if there was some check with
> the different product code for the patch that was holding back, no joy.
> <PatchBaseline Id="RTM">
> <Validate ProductId="no" UpgradeCode="no" ProductVersion="Major"
> ProductVersionOperator="GreaterOrEqual"/>
> </PatchBaseline>
>
> Any help or insight would be greatly appreciated.
>
> Thanks
>
> Matt
>
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> WiX-devs mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wix-devs
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> WiX-devs mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wix-devs
>
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-devs