You need to add the CustomAction binary to your upgrade build. It will then get 
into your patch because it is a difference between target and upgrade.

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joseph Valet
Sent: Friday, November 16, 2007 4:19 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] CustomAction in .msp MSI patch

Hi all,

I would like to know it is is possible to embed a Custom Action (type 2) in a 
WiX 3.x Patch (.msp file).

I base my work on the following example:

 * http://blogs.msdn.com/pmarcu/archive/2007/06/28/sample-patch.aspx

I enthusiastically added my custom action to the existing fragment:

{{{
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>


    <Patch    AllowRemoval="no"
        Manufacturer="corp"
        MoreInfoURL="http://www.dummy.com/";
        DisplayName="prod"
        Description="prod descr"
        Classification="Update">

        <Media Id="5000" Cabinet="RTM.cab">
            <PatchBaseline Id="RTM"/>
        </Media>

        <PatchFamilyRef    Id="UpdatePatchFamily" />
    </Patch>


    <Fragment>

       <PatchFamily Id="UpdatePatchFamily" Version="2.0.0.35">
            <ComponentRef Id="SampleComponent"/>
        </PatchFamily>

       <InstallExecuteSequence>
        <Custom Action="DoIt" Sequence="1301" />
       </InstallExecuteSequence>

       <Binary Id="myDLL" SourceFile="mydll.dll" />

       <CustomAction     Id="DoIt"
            BinaryKey="myDLL"
            DllEntry="MyFunction"
            Return="check" />

    </Fragment>

</Wix>
}}}

When compiling such file, I obtain the following errors:

{{{
C:\DRIVER\msi_builder> light.exe "NEXThink myPatch.wixobj" -out "myPatch.wixmsp"
Microsoft (R) Windows Installer Xml Linker version 3.0.2925.0
Copyright (C) Microsoft Corporation 2003. All rights reserved.

C:\DRIVER\msi_builder\myPatch.wxs(34) : error LGHT0241 :
    An unexpected row in the 'Binary' table was found in this patch.
    Patches cannot contain the 'Binary' table.
C:\DRIVER\msi_builder\myPatch.wxs(36) : error LGHT0241 :
    An unexpected row in the 'CustomAction' table was found in this patch.
    Patches cannot contain the 'CustomAction' table.
C:\DRIVER\msi_builder\myPatch.wxs(31) : error LGHT0241 :
    An unexpected row in the 'InstallExecuteSequence' table was found in this 
patch.
    Patches cannot contain the 'InstallExecuteSequence' table.
}}}

So I guess it won't be possible to add CustomAction's to my patch. However, I 
would like to have a confirmation by experienced WiX users and/or advices.

Thanks, best regards,

--J.
________________________________
Téléchargez 30 émoticônes gratuits pour Windows Live Messenger! Cliquez 
ici!<http://www.livemessenger-emoticons.com/fr-ch/>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to