On Monday, WiX Toolset v3.10 was released. The primary focus of v3.10 was to add support for Visual Studio 2015. However, we were able to slip something very important into the release at the very last minute: support for the updated ISO IEC/19770-2:2015 specification (better known as Software Identification Tags or SWID Tags). At FireGiant we think SWID Tags have an important role to play in software deployment so let's look at the support in WiX v3.10.

A bit of background

First of all, for those of you unfamiliar with SWID Tags let me provide a quick definition. The goal of the ISO IEC/19770-2 specification is to specify a standard way to identify software no matter the operating system, installation mechanism, purpose of the software, and so forth. Once software is identified in a standard way, it becomes possible for automation to reason about the state of software on and across machines. In the end, a SWID Tag is an XML file that conforms to the schema and placed at the locations defined by the specification.

Now some of you may remember that the WiX toolset already supported SWID Tags. That support was for the 2009 version of the specification. That version of the specification never gained much traction due to issues, particularly in the schema defintion and the installation location. The new 2015 revision of the specification is major update that attempts to address those issues. Personally, I really like what I see in the new spec.

Unfortunately, "major spec update" translates into some breaking changes to the WiX support for SWID Tags. We thought long and hard about ways to minimize the breakage. Ultimately, there are two breaking changes: registration id and install location. Let's look at each.

Registration id (regid) change

A regid is designed to ensure uniqueness of entities (like the person/company that produced software). In the previous specification, the regid was a combination of an entity's domain name (in reverse order) plus the year and month when the domain was first registered to the entity. For example: regid.1995-08.com.example.

The 2015 revision simplifies the definition of a regid to be a simple form of the entity's domain name. Staying with our example: example.com. I expect you'll agree that the 2015 version is much easier to provide.

Now the regid happens to be the one piece of information you had to provide the WiX toolset to generate a SWID Tag. We were able to synthesize 99% of the SWID Tags data requirements from information already provided in your .wxs file. Unfortunately, that means the change in the specification's regid format means data that you provided must be updated.

We considered converting the 2009 regid into a 2015 regid automatically. However, we didn't have enough examples available to be confident that would always work. So instead we added a warning to the WiX toolset when a 2009 regid is encountered that instructs you how to fix it.

Install location change

In the 2009 version of the specification, SWID Tags were installed to a well-known fixed location outside of the software's install location. This doesn't work well for many types of software. So in the 2015 spec the install location was changed to be a swidtag folder in the software's install location.

Unfortunately, in WiX v3.x, there is not a strong notion of the software's install location. Ideally ARPINSTALLLOCATION could be used but there are technical issues preventing its use beyond the fact that it is not required to be set by the WiX toolset today (a topic for another day).

So, our only solution for WiX v3.10 was to require the install location for the software to be explicitly called out in the authoring by referencing a Directory element (in an MSI package) or explicitly specifying the install path (in a Bundle). We want to revisit the underlying limitations in WiX v4.0 to improve the experience.

Putting it together

In the end, our goal is to make it as trivial as possible to add a SWID Tag to your installation package. One line, added to your Product or Bundle element, and a reference to the WixTagExtension is all you need to conform to the ISO IEC/19770-2:2015 specification.

<swid:Tag Regid="example.com" InstallDirectory="INSTALLFOLDER" />

Looking forward

In this blog post, I wanted to focus on the work we did at FireGiant to get SWID Tags 2015 support in WiX toolset v3.10. Looking forward, we have a few ideas where we might take SWID Tags at FireGiant. We also expect the industry to provide significant motivation for the adoption of SWID Tags.

For now, our job was to make it trivial for you to have a SWID Tag. To that end, we hope you find the work we did in v3.10 helpful—and know that there is more coming from FireGiant soon.

Until next time, keep coding. You know I am.