Hi,

 

  I would like to create a  patch which can install a single
file/component.

I am enclosing the code for your reference

 

Product.wxs

<?xml version="1.0" encoding="utf-8"?>

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>

    <Product Id="48C49ACE-90CF-4161-9C6E-9162115A54DD" Name="WiX Patch
Example Product" Language="1033" Version="1.0.0" Manufacturer="Dynamo
Corporation" UpgradeCode="48C49ACE-90CF-4161-9C6E-9162115A54DD">

        <Package Description="Installs a file that will be patched."
Comments="This Product does not install any executables"
InstallerVersion="200" Compressed="yes" />

        <Media Id="1" Cabinet="product.cab" EmbedCab="yes" />

        <FeatureRef Id="SampleProductFeature1" />

        <FeatureRef Id="SampleProductFeature2" />

        <UI />

    </Product>

    <Fragment>

        <Feature Id="SampleProductFeature1" Title="Sample Product
Feature1" Level="1">

            <ComponentRef Id="SampleComponent1" />

        </Feature>

    </Fragment>

    <Fragment>

        <Feature Id="SampleProductFeature2" Title="Sample Product
Feature2" Level="1">

            <ComponentRef Id="SampleComponent2" />

        </Feature>

    </Fragment>

    <Fragment>

        <DirectoryRef Id="SampleProductFolder">

            <Component Id="SampleComponent1"
Guid="{C28843DA-EF08-41CC-BA75-D2B99D8A1983}" DiskId="1">

                <File Id="SampleFile1" Name="Sample1.txt"
Source=".\$(var.Version)\Sample1.txt" />

            </Component>

            <Component Id="SampleComponent2"
Guid="{C28843DA-EF08-41CC-BA75-D2B99D8A1984}" DiskId="1">

                <File Id="SampleFile2" Name="Sample2.txt"
Source=".\$(var.Version)\Sample2.txt" />

            </Component>

        </DirectoryRef>

    </Fragment>

    <Fragment>

        <Directory Id="TARGETDIR" Name="SourceDir">

            <Directory Id="ProgramFilesFolder" Name="PFiles">

                <Directory Id="SampleProductFolder" Name="Patch Sample
Directory">

                </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="Dynamo Corp" 

        MoreInfoURL="http://www.dynamocorp.com/";

        DisplayName="Sample Patch" 

        Description="Small Update Patch" 

        Classification="Update"

        >

 

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

            <PatchBaseline Id="RTM"/>

        </Media>

 

        <PatchFamilyRef Id="SamplePatchFamily"/>

                </Patch>

                <Fragment>    

                                                <PatchFamily
Id='SamplePatchFamily' Version='1.0.0.0' Supersede='yes'>

 
<ComponentRef Id="SampleComponent1"/>

                                                </PatchFamily>

                </Fragment>

</Wix>

 

When I compiled the code and the patch got created is patching both
"SampleComponent1" and "SampleComponent2" which I don't want the
component "SampleComponent2" to be patched as I mentioned only
"SampleComponent1" reference in the Patch.wxs.

Can any one of you help in this regard.

 

Thanks & Regards

Narasimha Reddy

 

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to