Paraffin 3.0 – Now with Full WiX 3.0 Support

22 Comments December 22, 2008

Congratulations to the WiX team on hitting the Beta milestone for WiX 3.0! Now that code and schema changes are on the ramp down on the project, I thought it was the time to update my Paraffin tool to offer full support for WiX 3.0. If you didn't see the original set of blog posts I wrote about Paraffin (Part 1, Part 2, and Part 3.) the quick answer is that manually creating and hand maintaining your WiX fragments is enough to make any developer cry. I wrote Paraffin with the idea that it would do the hard work of creating and maintaining those fragments easier. With any tool of this sort, I have to caution you that you can completely break Windows Installer's component rules if you are not paying attention. This is especially true if you remove files from your install.

The 3.0 release of Paraffin creates WiX 3.0 compatible fragments only. I bumped the version number up to match the version of WiX it supports. (If you are still using WiX 2.0, keep using the 1.04 version.) However, if you have WiX 2.0 files you created with Paraffin 1.04, Paraffin 3.0 will properly update those files to WiX 3.0. If you haven't guessed, I'm just now upgrading my installations to WiX 3.0 so had a ton of files to convert. It took a little extra effort since the WiX XML namespace changed between 2.0 and 3.0, but it was definitely worth it to make the transition easy for me. All the fragments that Paraffin 3.0 creates are fully WiXCop compliant except for the whitespace checks.

I love the idea of the automated analysis that WiXCop does and really thank the team for the tool. The problem is that the whitespace analysis errors are so voluminous on every file you check you can't see the real errors it's reporting. To turn off those errors, here's my settings file, NoSpaceErrors.xml.

    <Test Id="WhitespacePrecedingNodeWrong" />
    <Test Id="WhitespacePrecedingEndElementWrong" />

When you run WiXCop, add the –set1NoSpaceErrors.xml to the command line and you won't be bothered by those errors ever again.

In addition to creating new WiX 3.0 files and updating WiX 2.0 Paraffin file to WiX 3.0, I also check all File elements and if the file is a .DLL, .EXE, or .OCX, I add the Checksum='yes' element. To see an example installer using Paraffin, the .\ParaffinInstaller directory in the ZIP file is a WiX 3.0 project for installing Paraffin. I've created fragments for the source, installer, and binary directories.

Grab Paraffin 3.0 here and as always, let me know if you have any feature requests or find any bugs!


  • Gravatar Image
    Jason Haley December 22, 2008 11:33 AM

  • Gravatar Image
    uhzzre December 23, 2008 4:47 AM

    Hi, is there binary version of Paraffin 3? I've started using WIX for my Python project - I don't have VS. The only exe from the zip file crashes.

  • Gravatar Image
    jrobbins December 23, 2008 11:38 AM


    Yes, I included a binary version with the download just for folks like you. :) You'll need to have .NET 3.5 SP1 installed in order to run it.

    Hope it helps!
    -John Robbins

  • Gravatar Image
    savaş oyunu December 27, 2008 6:50 PM

    ı have followed your writing for a long time.really you have given very successful information.
    In spite of my english trouale,I am trying to read and understand your writing.
    And ı am following frequently.I hope that you will be with us together with much more scharings.
    I hope that your success will go on.

  • Gravatar Image
    jrobbins December 27, 2008 7:36 PM


    Thanks! Your English is far better than my Turkish. :-)

    Best of luck to you too!

    - John Robbins

  • Gravatar Image
    John Robbins' Blog February 27, 2009 1:36 PM

    In one of my installs, I have to install the base .MSI and an .MSP patch file. In the Windows Installer

  • Gravatar Image
    Jianping March 3, 2009 4:52 PM

    What I want to do is to copy files in sub-directory DC (under current directory that I run Paraffin) to the directory "telephony_ext" in INSTALLDIR (in the server to be installed). Hopefully Paraffin can generate something like


    When I used following command line
    paraffin -dir DC -custom dc -dirref INSTALLDIR -g -alias DC -ext .WXS DC_fragment.wxs

    I did get the DC_fragment.wxs. But it will copy files to subdirectory dc in INSTALLDIR, like


    That is not what I want. It seems I have to maintain a directory structure in my PC to match directories installed, and put files to this directory structure before running Paraffin. It is unpractical and painful to do that because our files come from difference sources. Any suggestion to fix the problem?

  • Gravatar Image
    jrobbins March 3, 2009 11:28 PM


    Paraffin was designed to produce a .WXS fragment of an exact directory structure. What you're seeing is the behavior I was after. If you want a different style of output, use Paraffin but do a separate fragment for each individual directory you want.

    - John Robbins

  • Gravatar Image
    Jianping March 4, 2009 10:57 AM

    Thanks John for the quick response.

    Since -dir is the file source with the exact directory structure, the -alias seems redundant. Why Paraffin does not use -dir as File element's Source attribute?

    Actually I'm trying to do s separate fragment for each. But I still have problem. For example, I have 100 files in directory DC from application-A, and 200 files in directory WS from application-B. Both go to INSTALLDIR\telephony_ext during installation. I do not want to get messed up by merging all files to the single directory telephony_ext in my build directory, since they are from different source and keeping change. But I couldn't create two directories with the same name telephony_ext in the same build location.

    Ideally, if Paraffin could take one more parameter to specify the destination directory name, my problem would be gone. And Paraffin could be perfect. Thanks.

  • Gravatar Image
    jrobbins March 4, 2009 6:24 PM


    The -alias switch is used to avoid hard coding the full drive and directory in the src attribute.

    You're the only person who's asked for this feature. If others want it I'll look at adding it. All you'll need to do change the to after you use Paraffin to generate the file in the WS directory.

    The reason no one else has asked for this feature is that everyone else lumps all the files together before running tools like Paraffin.

    -John Robbins

  • Gravatar Image
    Jason Birch March 27, 2009 1:19 PM

    Hi John,

    Paraffin 3 came out just in time for us, thanks very much for creating this great tool. We're using it with success as part of the MapGuide Open Source installer project to bundle up about 12,000 files in multiple directories. Having to maintain this manually would have been a huge headache.

    Paraffin is called in the build.bat file in the "generate" and "regen" actions, and generates the files in each of the library's FileIncludes folder.

    Currently, our project builds and then installs into a staging area. This staging area is user-definable, but if it changes we run into problems with the -update operation because the Directory element is hard-coded in the Paraffin header, and can't be specified during an -update.

    It would be awesome if you could make the -dir switch available as part of the -update operation so that our build process could be truly portable without giving up on component rules.

    BTW, I read your blog on bootstrappers. We chose to use NSIS for the single file bootstrapper part of our build. The LZMA compression is nice, as is the ability to check prerequisites, etc.

  • Gravatar Image
    Steve April 1, 2009 9:58 AM

    First thanks fof Paraffin is looks like it will save me a lot of time and frustration.

    I have a question on the Directory Element. Can the @Name be eliminated? It contains the relative path from the Project file and on Install those files are installed in INSTALLDIR\PATH. I just want the files installed in INSTALLDIR


  • Gravatar Image
    jrobbins April 1, 2009 5:28 PM


    Good idea. I'll look at making the -dir switch something you can update. Glad to hear Paraffin has helped you out!


    The idea of Paraffin is to make it easy to add a directory to your INSTALLDIR. I need Name to match directories and files so if I take it out, I can't determine differences.

    - John Robbins

  • Gravatar Image
    zvolkov May 5, 2009 3:57 PM

    Hi John, I created a private fork of Paraffin. Added a new feature I needed for my project: mixins. Mixins are files with extension .mixin that you drop into a directory and when Paraffin harvests that directory it adds the content of the mixin to the wxs file it generates (the content must be valid xml). This allows me to turn multiple files per component and use mixins to create ServiceInstall and ServiceControl tags in my component. I also changed the way the KeyPath attribute is assigned. Instead of always setting it to Yes at the component level my fork looks at the files and if file's extension is .exe it sets the KeyPath. Let me know if you're interested in getting the modified source, it's really just a few extra lines (may be 20 or so). You can contact me at z volkov at g mail dot com

  • Gravatar Image
    John Robbins' Blog June 19, 2009 1:26 AM

    After a detour into Historical Debugging , it’s time to come back to return to answering questions about

  • Gravatar Image
    srudin June 25, 2009 7:04 PM

    Why are you adding the root directory to the fragment? The paraffin fragment always starts with DirectoryRef / Directory. Because the DirectoryRef references the INSTALLDIR this will always create another Directory beneath the path the user wants the app to install to; this is not what is intended, especially for webapps (this changes the root url!). Is there any way to prevent paraffin from including the root directory in the fragment? As this already is the INSTALLDIR I just want the root files right in there.
    Best regards & thanks for the tool

  • Gravatar Image
    srudin June 26, 2009 6:28 AM

    ...and there's yet another problem with this directory entry: it does not contain the name specified with the -custom flag so there a duplicate entry error when including two paraffin files in the same project that refer to two different directories with the same name.

    Is there a newer version out? Have I missed some information? Or do I just have very specific requirements? I mean this seems very basic for this component - what am I doing wrong that I stumble upon such problems?

  • Gravatar Image
    John Robbins' Blog June 28, 2009 1:34 PM

    Aren't &quot;New and Improved&quot; the most over used, and contradictory, terms in the marketer's dictionary?

  • Gravatar Image
    WillBates July 7, 2009 5:48 AM


    I have to agree with Jianping about having an additional parameter to specify the "Name" in the File element. We are trying to use Paraffin on the output from a Web Deployment Project. This output goes into the Debug or Release folder and Paraffin generates File elements that have a "Source" that points to one of these folders. However at deployment time I don't want the output to go into a Debug or Release folder. Being able to specify a base folder would be very helpful.



  • Gravatar Image
    jrobbins July 7, 2009 10:08 AM


    Make sure you read my blog:

    Paraffin 3.1 does exactly what you want.

    -John Robbins

  • Gravatar Image
    WillBates July 9, 2009 5:46 AM

    You are right, of course, I hadn't seen that. Paraffin 3.1 does do exactly what I want.



  • Gravatar Image
    whaling April 26, 2013 6:32 AM

    Hi! Your post rocks also as becoming a reputable amazing comprehend!??

Have a Comment?