blogs.conchango.com

welcome to the conchango blogging site
Welcome to blogs.conchango.com Sign in | Join | Help
in Search

Stuart Preston's Blog

Mostly about Visual Studio Team System, Team Foundation Server, Engineering Practices and Application Lifecycle Management.

WiX Tips and Tricks: Part 2 - Tallow, Component GUID's and Uninstallation

Included with the WiX toolset is a tool called Tallow.  This tool is meant for the purpose of walking a directory tree to produce valid Fragments containing Directories, Components and Files.  Unfortunately though, when using the tool you don't get a "Guid" attribute on each "Component" element as seen in the below example:

C:\wix>tallow -d ./doc -nologo
<Wix xmlns="http://schemas.microsoft.com/wix/2003/01/wi">
  <Fragment>
    <DirectoryRef Id="TARGETDIR">
      <Directory Id="directory0" Name="doc">
        <Component Id="component0" DiskId="1">
          <File Id="file0" Name="vssver2.scc" src="C:\wix\doc\vssver2.scc" />
          <File Id="file1" Name="WiX.chm" src="C:\wix\doc\WiX.chm" />
          <File Id="file2" Name="wix.xsd" src="C:\wix\doc\wix.xsd" />
          <File Id="file3" Name="wixloc.xsd" src="C:\wix\doc\wixloc.xsd" />
        </Component>
      </Directory>
    </DirectoryRef>
  </Fragment>
</Wix>

This in turn causes a problem on eventual uninstallation of the generated MSI - as there are no component Guid's, Windows Installer doesn't know which files to remove!

Enter Stefan Zschocke's "Mallow" tool available from http://www.infozoom.de/download/Mallow.zip.  This tool overcomes the limitations of Tallow - and also adds synchronisation functionality - the tool can be run with an existing .wxs file as input, any extra files will be added and existing component Guid's will be preserved.

C:\wix>mallow -d ./doc
<?xml version="1.0" encoding="IBM437"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2003/01/wi">
  <!--Mallow protocol 10/12/2005 18:48:45
  Added     Component Id=component0 Path=
  -->
  <Fragment>
    <DirectoryRef Id="TARGETDIR">
      <Component Id="component0" Guid="ec4d2b48-28f5-4c3d-bf02-ebc1d490177f" DiskId="1">
        <File Id="file0" Name="vssver2.scc" src="C:\wix\doc\vssver2.scc" />
        <File Id="file1" Name="WiX.chm" src="C:\wix\doc\WiX.chm" />
        <File Id="file2" Name="wix.xsd" src="C:\wix\doc\wix.xsd" />
        <File Id="file3" Name="wixloc.xsd" src="C:\wix\doc\wixloc.xsd" />
      </Component>
    </DirectoryRef>
  </Fragment>
</Wix>

Update: Actually, Rob Mensching has updated SourceForge to say that this functionality has now been added to Tallow, see http://sourceforge.net/tracker/index.php?func=detail&aid=1120401&group_id=105970&atid=642717 - and as Rob mentions in his blog post, they are gearing up to push another release to SourceForge imminently including MSI 4.0 support.
Published 10 December 2005 18:35 by Stuart.Preston

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
(optional)
(required) 
Submit
Powered by Community Server (Personal Edition), by Telligent Systems