Wintellect Blogs

Paraffin Bug Fix and Future Ideas

John Robbins

15 Nov , 2012  

Things have slowed down enough I was able to get around to fixing a small bug in Paraffin where I was accidentally including .ParaffinMold files in the .WXS output. Also, as I finally caught up with the cool kids and finally started using ReSharper. Since I love fixing bugs at compile time instead of runtime, I looked through the errors ReSharper reported and fixed all the ones that wouldn’t destabilize the code too much. You can always grab the latest Paraffin on GitHub: https://github.com/Wintellect/Paraffin.

(Moving to ReSharper has been interesting because I’m so used to using Visual Studio without it. There’s a lot of cheese moving going on but I’m slowly getting used to the ReSharper power. Yesterday in my Mastering .NET Performance Tuning virtual session someone commented that watching me struggle with the new keystrokes was like watching an old dog learn new tricks. That made me laugh out loud.)

For a while I’ve had two code changes people have submitted for Paraffin. In the end, I decided not to include them for now but thought it was important to get some more feedback from Paraffin users. The first change was from Jean-Francois Montpetit and was about making the .ParaffinMold files more useful.… Read more

,

Wintellect Blogs

Paraffin 3.6–Now Keeping Custom Added Namespaces

John Robbins

19 Jan , 2012  

Paraffin 3.6 can be downloaded here: http://www.wintellect.com/CS/files/folders/18310/download.aspx

Dan Gough had an excellent feature request to have Paraffin copy over any manually added namespaces to the .WXS file like the following. Previously, Paraffin ignored them, but no more.

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Wix xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
  3.      xmlns="http://schemas.microsoft.com/wix/2006/wi">

I updated Paraffin to copy over any namespaces added to the Wix element when creating the .PARAFFIN file. If you were having Paraffin inject additional elements with a .ParaffinMold file, now it’s easier than ever to keep your WiX fragments up to date.

When adding custom namespaces, put them before the default xmlns="http://schemas.microsoft.com/wix/2006/wi" as I’ve shown in the snippet above. With LINQ to XML, the xmlns attribute is special and does not show up in the Attributes collection so there’s no way I can sort it with the rest of the values. When generating the output XML file, XDocument always puts the xmlns attribute last. I tried all sorts of tricks to get it placed first but never got them to work.

There’s no trouble if you place your custom namespaces after the default xmlns, but in the .PARAFFIN file they will always appear first so you’ll see more changes when you diff the .WXS and .PARAFFIN file.… Read more

,

Wintellect Blogs

Web Application Installer in WiX

John Robbins

23 Feb , 2011  

If all you need to do is install your web application into Default Web Site, life is easy. Especially since Windows Installer XML (WiX) has all that support right in the box. Where things get nasty is if you need an installer that lets the user choose the web site, set the web application name, and the application pool. If you’re newish to WiX, that can be a daunting task. You might be tempted to skip WiX and use a Web Setup Project built into Visual Studio because those do offer a solution to the requirements. Sadly, Web Setup Projects are a giant world of hurt because of their other limitations. Add in the fun fact that Microsoft is dropping support for them in future releases of Visual Studio and it’s pretty obvious you need to avoid them.

Since this seems like a very common request, I thought I’d create an example WiX project that does what the now dying Web Setup Projects so there’s a path to a supported installation technology. While pieces of this type of installer have been covered before, especially the excellent article by Jon Torresdal, but there wasn’t a complete example. As always, if you’ve got any questions, feel free to email me or ask them in the comments.… Read more

Wintellect Blogs

Install a New Virtual Directory to Default Web Site with WiX

John Robbins

25 Jan , 2011  

Sometimes the internet is totally awesome and other times it’s a complete morass of “how come I can’t find anything?” Recently, I needed to build a quick installer that did nothing more than install new virtual directory under the ubiquitous Default Web Site. I thought installing a basic web site would have been a very common task and was sure there were fifty to sixty examples out there in the blogsphere. However, the internet failed me, which has to be the first time in recorded history that’s ever happened.

Fortunately, there was enough documentation out there that pointed me in the right direction. What’s below is the core .WXS file for an installer that meets the following requirements:

· Verifies that IIS is installed

· Finds the physical path for the Default Web Site

· Installs a specifically named virtual directory under Default Web Site

· Installs the files into a named directory under the Default Web Site physical path

As you can see, the WiX 3.5 code isn’t that exciting, but I thought it would be useful for new WiX developers to see and better yet, steal. Here’s the download for the entire project.

 

<?xml version="1.0" encoding="UTF-8"?>
<
Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:iis="http://schemas.microsoft.com/wix/IIsExtension">
  <!–
The upgrade GUID ** DO NOT CHANGE!!
Read more

Wintellect Blogs

Zen of Paraffin

John Robbins

31 Aug , 2010  

With Paraffin 3.5, I included this document, but thought it would be worth posting as well for those of you that aren’t familiar with Paraffin. You can download the lastest release here: http://www.wintellect.com/CS/files/folders/18310/download.aspx

Introduction

When building WiX-based installers, you quickly run into the problem of maintaining the list of files you want to install. The HEAT tool that comes with WiX does a great job creating the initial fragments, but doesn’t have any support for what happens during normal development: you’re adding and removing files all the time. For many installs, HEAT works fine, but if you have an installer that’s installing hundreds to hundreds of thousands of files, the thought of maintaining those fragments of XML by hand would fill anyone with dread.

A few years ago, I was running into that same trouble with my WiX installers right around the time .NET 3.0 and LINQ were starting their beta testing. Seeing a need to scratch my itch, I dove in and created Paraffin. The idea was simple, you could maintain your fragments without breaking component rules as files were added and removed from your installer. Paraffin has grown as more people have started using it and suggest features. Thanks to everyone who’s used Paraffin!… Read more

,

Wintellect Blogs

Paraffin 3.5 – Now with Better Minor Upgrade Support

John Robbins

31 Aug , 2010  

Slowly but surely I’m getting through the list of feature requests everyone’s been asking for. This release of Paraffin brings support for the trick outline by Vagmi Mudumbai (http://geekswithblogs.net/Vagmi.Mudumbai/archive/2006/06/11/81426.aspx) of allowing minor upgrades (AKA patches) to remove files by setting the transitive bit on the component and adding a conditional element that evaluates to false.

<Component Id="comp_F5B392C05B5249C2AB34810BE4A6163F"
           Guid="FD9D7BF4-550A-47E2-85A3-634D77F609FB"
           Transitive="yes">
  <File Id="file_81DD236ED61B4BBEB445FAB9E9C2DAB2"
        Checksum="yes"
        KeyPath="yes"
        Source=".\Temp\a.exe" />
  <Condition>1 = 0</Condition>
</Component>

So if you need to delete A.EXE on a minor upgrade, delete A.EXE from disk and run Paraffin with the new –PatchUpdate switch. The output .PARAFFIN file will have the following in it for A.EXE

Those of you who’ve looked at Vagmi’s trick are wondering about the other piece that needs to be there; the file. But you deleted the file. If you build with WiX, you’ll get an error because the File element must point to a file to put in the output .MSP. To keep the patch file small, you should have a zero byte file called A.EXE to make everything work.… Read more

,

Wintellect Blogs

Paraffin 3.13 and an Ask for Help

John Robbins

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 http://geekswithblogs.net/Vagmi.Mudumbai/archive/2006/06/11/81426.aspx.

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.… Read more

,

Wintellect Blogs

Paraffin 3.12: A Bug Fix and Three New Features

John Robbins

11 May , 2010  

After a bit of rest and relaxation, Paraffin, my tool to make managing your Windows Installer XML (WiX) fragments easier makes a surprise appearance back on my blog. If you’re not familiar with Paraffin search this blog for numerous entries. Grab the latest version here. The relevant changes are as follows.

  • I moved everything over to Visual Studio 2010 and .NET 4.0. I put the Visual Studio 2008 compatible project files for Paraffin and the Paraffin Installer into a VS2008Projects directory. Right now none of the code takes advantage of any .NET 4.0 features but as I add features in the future, I probably will use .NET 4.0 things if it makes sense.
  • There was a bug in how I handled .ParaffinMold files if the –multiple switch was used to put multiple files into a single component. That’s been fixed.
  • The new –DiskId switch lets you specify the value of the Component DiskId element so you can split your installers into several packages.
  • The new –IncludeFile switch lets you include processing directives into the output .WXS file. This way if you have a set of common WiX preprocessor defines you can include that file. The include files you specified are not checked or validated in any way.
Read more

,

Wintellect Blogs

WiX Projects vs. TFS 2010 Team Build

John Robbins

14 Nov , 2009  

As I mentioned before, I’m in the process of moving my life over to TFS 2010 Beta 2. I’m using the excellent WiX 3.5 Beta that plugs into Visual Studio 2010 to create my setup and I had a developer build working like a dream. Things got a little more exciting when I created my first build definition and let the build fly on the build server.

The build failed with errors like the following:

light.exe: Error executing ICE action ‘ICE01’. The most common cause of this kind of ICE failure is an incorrectly registered scripting engine. See http://wix.sourceforge.net/faq.html#Error217 for details and how to solve this problem. The following string format was not expected by the external UI message logger: “The Windows Installer Service could not be accessed. This can occur if you are running Windows in safe mode, or if the Windows Installer is not correctly installed. Contact your support personnel for assistance.”.

The first eight Internal Consistency Evaluators (ICE) failed and ICE8 was the most unhappy of all:

light.exe: An unexpected Win32 exception with error code 0x643 occurred: Action – ‘ICE08’ Fatal error during installation

I had installed TFS Build on my build server using the defaults, which uses NT AUTHORITY\NETWORK SERVICE as the account for running the build controller and agent.… Read more

Wintellect Blogs

Paraffin3.1: New and Improved!

John Robbins

28 Jun , 2009  

Aren’t “New and Improved” the most over used, and contradictory, terms in the marketer’s dictionary? How can something and be new, but yet improved because if it is improved that cancels out the new. My point is that I want to tout an updated release of Paraffin, but I guess I’m being too much of an engineer instead of a marketer which is not a good idea when you something new and improved. Argh! I don’t think I’m helping myself here much. How about I express it this way; Paraffin has some improved things and some new things both of which I think users will greatly appreciate.

For those of you wondering what Paraffin does it’s a tool I wrote to help produce Windows Installer XML (WiX) fragments of files in your installations. The big feature of Paraffin is that is automates the management of your files because it keeps consistent the component ids and GUIDs as well as file and directory ids as you add files to your installer. Component GUID management is one of the biggest pain points on any WiX projects, especially those that have many files to install.

For background, I’ll refer you to the WiX 3.0 documentation, as well as the articles I wrote on the motivation behind Paraffin, Part 1, Part 2, and Part 3.… Read more

,