Paraffin 3.0 – Now with Full WiX 3.0 Support

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.

<Settings>
<IgnoreErrors>
<Test Id=”WhitespacePrecedingNodeWrong” />
<Test Id=”WhitespacePrecedingEndElementWrong” />
</IgnoreErrors>
<ErrorsAsWarnings/>
<ExemptFiles/>
</Settings>

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!

John Robbins

View Comments

  • 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.

  • Uhzzre,
    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

  • ı 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.

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

  • 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?

  • Jianping,
    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

  • 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 INSTALLDIRtelephony_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.

  • Jianping,
    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

Recent Posts

8-Step AWS to Microsoft Azure Migration Strategy

Microsoft Azure and Amazon Web Services (AWS) are two of the most popular cloud platforms.…

2 days ago

How to Navigate Azure Governance

 Cloud management is difficult to do manually, especially if you work with multiple cloud…

1 week ago

Why Azure’s Scalability is Your Key to Business Growth & Efficiency

Azure’s scalable infrastructure is often cited as one of the primary reasons why it's the…

3 weeks ago

Unlocking the Power of AI in your Software Development Life Cycle (SDLC)

https://www.youtube.com/watch?v=wDzCN0d8SeA Watch our "Unlocking the Power of AI in your Software Development Life Cycle (SDLC)"…

1 month ago

The Role of FinOps in Accelerating Business Innovation

FinOps is a strategic approach to managing cloud costs. It combines financial management best practices…

1 month ago

Azure Kubernetes Security Best Practices

Using Kubernetes with Azure combines the power of Kubernetes container orchestration and the cloud capabilities…

2 months ago