You cant remove components in a patch. You need a major upgrade to do that. There is a workaround called the "puncture pattern", mentioned here if you really need to do it but you can just leave the component in place until the next major upgrade. http://geekswithblogs.net/Vagmi.Mudumbai/archive/2006/06/11/81426.aspx
To add a component, add it to your 1.0.1 installer and include the ComponentRef in the patchfamily. It doesnt make sense to change the original MSI because the users wont have the changed version installed. I would also include <PropertyRef Id="ProductVersion"/> in the patchfamily if you have changed the ProductVersion property in the updated MSI. Your media Id must be higher than any sequence number in the baseline MSI's Media/File table. -----Original Message----- From: WiX_Maik [mailto:maik.czym...@de.bosch.com] Sent: 30 July 2010 11:59 To: wix-users@lists.sourceforge.net Subject: [WiX-users] Deploying new or removing existing files using a Patch(MSP) Dear community, I want to create a Patch (MSP) for an existing MSI Setup package. Therefore I use the "diff" between my currently released MSI and the new one I have/want to create. I understand how to update existing components of my initial MSI package, but how can I add new files or remove complete components from the old installation? Here is my current WiX patch code ("patch.wixmsp"): ------------------------------------------------------------------------ --------------------- <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Patch AllowRemoval="yes" Manufacturer="My Company" MoreInfoURL="http://www.my-company.com/" DisplayName="My Product 1.0 Patch 01" Description="Small Update patching the My Product Version 1.0.0 to 1.0.1" Classification="Update"> <Media Id="5000" Cabinet="RTM.cab"> <PatchBaseline Id="RTM"/> </Media> <PatchFamilyRef Id="MyProductPatchFamily"/> </Patch> <Fragment> <PatchFamily Id='MyProductPatchFamily' Version='1.0.0' Supersede='yes'> <!-- Update of existing components: BEGIN --> <ComponentRef Id="PatchThis1.dll"/> <ComponentRef Id="PatchThis2.dll"/> <!-- Update of existing components: END --> </PatchFamily> </Fragment> </Wix> ------------------------------------------------------------------------ --------------------- Do I have to add the new components to the <PatchFamily> section directly or add it in my 1.0.1 MSI? How can mark the components as "to be removed"? Do I have to change my original MSI therefore? Here goes the build script for the current "patch.wixmsp": ------------------------------------------------------------------------ --------------------- echo. echo - Generating difference between MSIs... echo. "%WIX%\bin\torch.exe" -p -xi "current\My Product.wixpdb" "update\My Product.wixpdb" -out "_build\diff.wixmst" if ERRORLEVEL 1 goto error echo. echo - Compiling... echo. "%WIX%\bin\candle.exe" -out "_build\patch.wixobj" "patch01.wxs" if ERRORLEVEL 1 goto error echo. echo - Linking... echo. "%WIX%\bin\light.exe" "_build\patch.wixobj" -out "_build\patch.wixmsp" if ERRORLEVEL 1 goto error echo. echo - Building patch... echo. "%WIX%\bin\pyro.exe" "_build\patch.wixmsp" -out "My Product 1.0 Patch 01.msp" -t RTM "_build\diff.wixmst" if ERRORLEVEL 1 goto error goto end :error echo. echo - Build failed! pause exit /B 1 :end echo. echo - Build completed successfully. pause ------------------------------------------------------------------------ --------------------- Many thanks in advance! -Maik -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Deploying- new-or-removing-existing-files-using-a-Patch-MSP-tp5354544p5354544.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------ ------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users </pre> <BR style="font-size:4px;"> <a href = "http://www.sdl.com"><img src="http://www.sdl.com/images/email logo_150dpi-01.png" alt="www.sdl.com" border="0"/></a> <BR> <font face="arial" size="2" "><a href = "http://www.sdl.com" style="color:005740; font-weight: bold">www.sdl.com</a> <BR> <BR> <font face="arial" size="1" color="#736F6E"> <b>SDL PLC confidential, all rights reserved.</b> If you are not the intended recipient of this mail SDL requests and requires that you delete it without acting upon or copying any of its contents, and we further request that you advise us.<BR> SDL PLC is a public limited company registered in England and Wales. Registered number: 02675207.<BR> Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, UK. </font> ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users