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

Reply via email to