Wintellect Blogs

Paraffin 3.13 and an Ask for Help

8 Jul , 2010  

Before I get into the quick new features for Paraffin 3.13 (download here), I need to ask for your help. Pretty much from the first day I released Paraffin, I’ve been consistently getting the following question:

I want to be able to uninstall obsolete components during minor upgrades.

For this I would like to have an additional option, which does not remove missing/deleted files from the .Paraffin file. Instead it should generate the code according to

Paraffin should set component to transitive and use a false condition. If a file does not exist it should use a 0-byte dummy file.

I think that’s a great feature, but being mostly a Windows Installer neophyte, I have no idea what that’s supposed to look like in actual WiX format. If one of you WiX ninjas can give me a functioning sample of an installer with a functioning patch using the above trick in WiX, I’ll get that feature worked into Paraffin.

While I think major upgrades are the way to go because they are easier to manage, I know there are some of you using Paraffin where patching is a requirement. Shoot that sample to john @ this company’s domain.

Paraffin 3.13 now supports a new command line option –regExExclude. Now you can exclude files and directories based on regular expressions to give you much more control. The new switch works for both creating files as well as when updating files to add new exclusions after you’ve already created your initial file. The –ext switch still excludes by file extension and –direXclude continues to exclude directories based on a value contained in the string. How the implementation work is that for both files and directories, I process the –ext and –direXclude switches before I process the –regExExclude. I thought that would be better for backwards compatibility.

In the Paraffin download, I updated the example installer to show using the new switch when building the WiX fragment for the output Debug directory. All you want included from the compiled output is the .EXE and .PDB files, but Visual Studio has a bunch of other files like Paraffin.VSHOST.EXE and with Code Analysis turned on, those *.CodeAnalysisLog.xml and *.lastcodeanalysissucceeded files. With the new –regExExclude switch, you can specify the following on the command line to avoid those files

-rex “.*\.vshost\.exe.*” -rex “.*codeanalysis.*”

If you’re not familiar with regular expressions, now you have a real reason to learn them. One final note is that for files the regular expression is tested against just the filename. For directories, your regular expression is tested against the complete drive and path. This new trick should make Paraffin easier to control for many of you.

The second thing I did for version 3.13 was remove something, the file creation node in the comment section. Many people wanted to be able to do automatic diffs on a .WXS and the updated .PARAFFIN file and the creation node messed those up. Removing the node means you can automate running Paraffin with the –update switch as part of your build and if your diff tool reports a difference, you can halt the build until the installer gets properly fixed.

My plan is to have another release of Paraffin soon that adds some major features. Hisham Zreiq sent me some awesome extensions to Paraffin that incorporates COM registration, by using the same code Heat does. I’ll make this an optional flag to ensure it works with existing Paraffin uses. In addition to the above mentioned possible patching support, I also want to incorporate the latest WiX 3.5 language changes for the Component element, which will make my code drastically simpler.

As always, please don’t hesitate to let me know you have ideas for Paraffin because I’d love to hear about them.


  • Anonymous

    Hi John,

    This feature seems like it might be nice to have in the future. I did a little testing and this does indeed seem to work.

    The steps are:
    – Put the “Transitive” attribute on the existing component to “yes”
    – Add a false condition inside the component
    – Point the existing file path to a fake file with 0 bytes


    1 = 0

  • Anonymous


    I’m trying to use Parafin.exe on a large build, but I have a question being new to WiX (and not being the Setup developer).

    I need to have COM assemblies registered (plus Type Libraries) like regasm.exe would.

    I know Heat.exe can generate the WiX fragments if I do the following…

    Regasm MyDLL.dll /tlb:MyDLL.tlb
    Heat file MyDLL.dll -out MyDll-1.wxs
    Heat file MyDll.tlb -out MyDll-2.wxs

    …although then there’s even more editing for Component Ids, etc etc.

    Is this really this difficult?? Can Parafin.exe do something similar/better for my .dlls? I can’t find a good explanation of this anywhere and I’m spending all kinds of time reading general WiX info when I just want to get on with my slice of product development. I don’t even have any control over how deployment is handled.


  • jrobbins


    Welcome to the world of Windows Installer. 🙁 Right now Paraffin does not support the harvesting of registration information like Heat does. It’s on my list of things to do.

    – John Robbins

  • Anonymous

    I am going to echo some previous commenters and suggest that you put Paraffin up on CodePlex / SourceForge. It took me awhile to realize that Paraffin v3.13 even existed and I desperately needed the regExExcludes functionality. Thanks for all your hard work.

  • jrobbins

    Chris S and the others who have asked me to put Paraffin up on CodePlex/SourceForge,

    If you want to know when new versions of Paraffin are coming out, how about subscribing to my blog with your RSS reader? 🙂

    The next version is a tiny 700 lines of code and the hassle of CodePlex/SourceForge is simply not worth it to me. If Paraffin was the size of the WiX code base of course it would be up there.

    Also, we want you coming to Wintellect’s web site. These blogs are how we market our consulting and training work. We are a business after all! 🙂

    Thanks for using Paraffin!
    -John Robbins