Adventures in the land of Windows Packaging …
WiX – Windows Installer XML
Before I start, this isn’t a WiX installer bashing session. WiX is an amazing tool.
I’ve been using WiX for my own application since about 2010. It’s worked for the most part but I have honestly hated every minute of working with it. It’s extremely unforgiving and doesn’t hide any details from you. The truth is the root of most developers installer pain comes from Windows Installer itself, not the tools. It’s a million miles away from how well Linux handles packages. And any discussion about the fact the registry even exists at all is well beyond this article. Anyway …
WiX has been used to produce some of the most complex installers I’ve used. Think SQL Server, Visual Studio and Office. I can’t think of many more examples of more complex installers. And that’s the crux of it. For 99.9999999% of use cases, using WiX is like getting in the Space Shuttle to go the local shop for a pint of milk. Powerful? Yes. But also complex, fiddly and time consuming.
WiX has an extremely steep learning curve directly due to this inherent complexity. As far as I know, WiX is capable of doing *anything* Windows Installer allows. It’s regarded as the most powerful and complete toolset, that has a price associated in terms of complexity as a result. That’s not to say others have a very similar feature set.
Along with this I’ve continually struggled to find working examples of things and also due to it’s flexibility there are often many ways of organising things. The documentation is very scant and more functional than instructional. It’s really documented by the community more than anything else.
Installer Requirement
My own focus has changed somewhat. I’m about to launch my first commercial product and had a need to update my installer. Thus ensued several more lost evenings. Working evenings after client work. Finding a solution, build installer, deploy VM, test, rinse and repeat. It’s laborious and a complete distraction from writing code for my customers.
The main reason for looking around the market again is that the first thing my customers see, is the installer. Considering the issues I’ve been having getting the installer to function properly I don’t really have confidence that all customers are going to have a good experience. Once you start delving into the world of installers things can get really crazy at times. Missing KB issues, permission issues the list is endless. There’s good reason why you can become a deployment engineer if you want too. It’s a complex job.
What do I do when a customer has an issue?
I don’t have the time or resources to troubleshoot users with odd installer issues I myself don’t fully understand and can’t replicate. The customer is left with nothing, potentially a paying customer at that and my company would look incompetent. Bad news spreads much faster than good. A commercial installer vendor will have hundreds or thousands of customers feeding back all manner of battle scars from out in the wilds. By buying into an installer my customers and I can benefit from all those lessons learned … and fixed.
What swung it was I’d just got my WiX installer working on a vanilla Win 7 SP1 VM. Going from a clean VM, my WiX installer worked fine. It detected a missing dependency and installed .NET 4.8, rebooted the machine and then carried on with my product install. Great. That’s almost the worst case scenario – Old OS, no .NET and no updates having been run, my installer worked!
Now, what’s my confidence level that’s going to be true for everyone? Or even a majority? … Honestly? … not very high.
One developer, on a well maintained machines with a tiny number of VMs cannot hope to adequately test an installer. It’s an impossible task.
Also, a lot of developers will quite rightly recommend WiX. It will check every box for every requirement you can dream up. Whilst that is true, a lot of these same developers will be working mainly on B2B solutions. The kind of environments where the customer has their own IT department. That’s a world away from having an installer sat on a web site that *anyone* with an internet connection can download and install. The difference is like night and day.
Investigating Installers
So I went off looking around the market again. If you’re a small shop like me, there are many installers you can just skip over as they have eye-popping price tags. Some even in the multiple thousands of £ per seat. This is where Advanced Installer looked pretty promising. People seemed to like it. It had solid reviews on many sites I checked. It has a long history in the market and the price wasn’t outrageous for the features I needed.
Even just working on this last installer, I’d burned through valuable time and given my usual day rate, probably 4 times the price of Advanced Installer. Just on this last session of installer updates.
Is that really time well spent? Time that could have been spent on bringing new features to my application. There’s also no guarantee it’s going to work and so I can’t guarantee that’s the end of it’s cost in terms of time and effort.
Now what happens if the scenario described above actually happens to a customer that’s just bought my software. What then?
Advanced Installer
So what were first impressions of Advanced Installer like?
Honestly?
Jaw dropping.
Genuinely.
I copied over my build directory, as-is, to one of my testing VMs, installed Advanced Installer on this VM to test it out.
I fired it up and started a project. Went through the wizard and built a functionally identical installer within THIRTY SECONDS of having Advanced Installer set up. I’m not even exaggerating. It was both a bit of a marvel and a bit defeating. No, it didn’t have my swanky fully custom WPF UI. It didn’t have all the polish of things like support links, icons and the EULA. But so what. It was 30 seconds of work.
I didn’t believe it was going work …
So I took that 30 second job and ran it. It worked, and so did the installed application.
SOLD.
So, I’ve just spent the last 2 hours polishing that project. Sorting out the theme images, icons and plugging in anything else required into the build process. I’ve just integrated it into my GitLab build YAML using powershell. That’s merrily building installers and the testing on VMs is perfect.
Job done.
User Interface
As I said above. I couldn’t believe how quickly I was up and running with Advanced Installer. The User Interface is more than serviceable and the Wizard I used to create the project worked flawlessly. It’s the usual Windows Ribbon affair which love or hate it, does get the job done.
At no point was I presented with a stack of too much information. The options and sections are laid out sensibly. Obviously, my having installer experience helped as the concepts were familiar already. All in all. No complaints on the UI at all.
One very cool feature is the built in support for VMs. If you go for the Enterprise version you can build your installer and without leaving the tool, fire up a VM and safely test the new installer build. Very cool.
Visual Studio Integration
There is also a visual studio plugin available in the market place. Once my installer was working I decided to get it integrated. I’m not usually particularly fond of top loading my IDE with plugins. I have #ReSharper and some XAML tools but other than that I like to keep it lean. ReSharper is enough of a beast on it’s own.
I did run into an issue here in that I could find a way to create an AI project and import an existing *.aip file. So I jusd created a new project and then hacked it around to point to the existing *.aip file and everything is working. The VS UI is understandably less feature rich than the application but that’s no issue.
I have set it up so the installer doesn’t build from VS (Configuration Manager) as I have my GitLab pipelines for that. But I now have the installer properly integrated into my development loop. Fantastic.
Issues
So far I’ve only encountered a couple of issues. I ran into some really odd certificate code signing issue. A quick search turned up a thread on their forum saying it was fixed … from 2012. Hmm. Their solution on that thread was what was causing the problem for me. I worked around that and now have a fully working build pipeline. The tool UI found my code signing cert and popped it into the drop down for me. But pumping that through GitLab just bombed. Almost certainly a permissions issue and not the tooling. The GitLab build runner runs under a limited account and I’m not going to change that anyway.
Wix Import
Another red flag for me regarding my own installer is that Advanced Installer couldn’t import my WiX. So what do I make of that? Is that a problem with Advanced Installer, a bug shall we say. Or is that due to an issue in my WiX that I’m not aware of, yet it also allows the installer to work? And that’s the crux of it. I don’t know. I could burn through countless hours identifying that “why”, or I could burn through that time and still not know. Is that also an issue that would only manifest on a client machine because, as they say, it works on my machine(s).
Is that risk worth it? I’m not convinced it is.
Reboot Requirement
The only other issue I’ve spotted was around detecting pending reboots. It seems a bit “twitchy” here. That fired and prevented install even when there wasn’t a pending reboot. It also didn’t do it 100% of the time. I’ve turned that off for now as it’s not particularly crucial anyway.
Summary
All in of that achieved in just a matter of 3 hours is amazing. My confidence is much higher. I guess only time, and paying customers, can truly answer that one.
If you never touched installers before and you have a requirement to use WiX and you need to give some estimates for work. Give yourself several weeks just to get up to speed on WiX basics. The more complex your installer the longer it may take. It’s at least as important as your application code. It’s the first thing your customers see …
I can at this stage definitely recommend looking at Advanced Installer. I’ll loop back at some point and post an update.
Adventures in the land of Windows Packaging …
WiX – Windows Installer XML
Before I start, this isn’t a WiX installer bashing session. WiX is an amazing tool.
I’ve been using WiX for my own application since about 2010. It’s worked for the most part but I have honestly hated every minute of working with it. It’s extremely unforgiving and doesn’t hide any details from you. The truth is the root of most developers installer pain comes from Windows Installer itself, not the tools. It’s a million miles away from how well Linux handles packages. And any discussion about the fact the registry even exists at all is well beyond this article. Anyway …
WiX has been used to produce some of the most complex installers I’ve used. Think SQL Server, Visual Studio and Office. I can’t think of many more examples of more complex installers. And that’s the crux of it. For 99.9999999% of use cases, using WiX is like getting in the Space Shuttle to go the local shop for a pint of milk. Powerful? Yes. But also complex, fiddly and time consuming.
WiX has an extremely steep learning curve directly due to this inherent complexity. As far as I know, WiX is capable of doing *anything* Windows Installer allows. It’s regarded as the most powerful and complete toolset, that has a price associated in terms of complexity as a result. That’s not to say others have a very similar feature set.
Along with this I’ve continually struggled to find working examples of things and also due to it’s flexibility there are often many ways of organising things. The documentation is very scant and more functional than instructional. It’s really documented by the community more than anything else.
Installer Requirement
My own focus has changed somewhat. I’m about to launch my first commercial product and had a need to update my installer. Thus ensued several more lost evenings. Working evenings after client work. Finding a solution, build installer, deploy VM, test, rinse and repeat. It’s laborious and a complete distraction from writing code for my customers.
The main reason for looking around the market again is that the first thing my customers see, is the installer. Considering the issues I’ve been having getting the installer to function properly I don’t really have confidence that all customers are going to have a good experience. Once you start delving into the world of installers things can get really crazy at times. Missing KB issues, permission issues the list is endless. There’s good reason why you can become a deployment engineer if you want too. It’s a complex job.
What do I do when a customer has an issue?
I don’t have the time or resources to troubleshoot users with odd installer issues I myself don’t fully understand and can’t replicate. The customer is left with nothing, potentially a paying customer at that and my company would look incompetent. Bad news spreads much faster than good. A commercial installer vendor will have hundreds or thousands of customers feeding back all manner of battle scars from out in the wilds. By buying into an installer my customers and I can benefit from all those lessons learned … and fixed.
What swung it was I’d just got my WiX installer working on a vanilla Win 7 SP1 VM. Going from a clean VM, my WiX installer worked fine. It detected a missing dependency and installed .NET 4.8, rebooted the machine and then carried on with my product install. Great. That’s almost the worst case scenario – Old OS, no .NET and no updates having been run, my installer worked!
Now, what’s my confidence level that’s going to be true for everyone? Or even a majority? … Honestly? … not very high.
One developer, on a well maintained machines with a tiny number of VMs cannot hope to adequately test an installer. It’s an impossible task.
Also, a lot of developers will quite rightly recommend WiX. It will check every box for every requirement you can dream up. Whilst that is true, a lot of these same developers will be working mainly on B2B solutions. The kind of environments where the customer has their own IT department. That’s a world away from having an installer sat on a web site that *anyone* with an internet connection can download and install. The difference is like night and day.
Investigating Installers
So I went off looking around the market again. If you’re a small shop like me, there are many installers you can just skip over as they have eye-popping price tags. Some even in the multiple thousands of £ per seat. This is where Advanced Installer looked pretty promising. People seemed to like it. It had solid reviews on many sites I checked. It has a long history in the market and the price wasn’t outrageous for the features I needed.
Even just working on this last installer, I’d burned through valuable time and given my usual day rate, probably 4 times the price of Advanced Installer. Just on this last session of installer updates.
Is that really time well spent? Time that could have been spent on bringing new features to my application. There’s also no guarantee it’s going to work and so I can’t guarantee that’s the end of it’s cost in terms of time and effort.
Now what happens if the scenario described above actually happens to a customer that’s just bought my software. What then?
Advanced Installer
So what were first impressions of Advanced Installer like?
Honestly?
Jaw dropping.
Genuinely.
I copied over my build directory, as-is, to one of my testing VMs, installed Advanced Installer on this VM to test it out.
I fired it up and started a project. Went through the wizard and built a functionally identical installer within THIRTY SECONDS of having Advanced Installer set up. I’m not even exaggerating. It was both a bit of a marvel and a bit defeating. No, it didn’t have my swanky fully custom WPF UI. It didn’t have all the polish of things like support links, icons and the EULA. But so what. It was 30 seconds of work.
I didn’t believe it was going work …
So I took that 30 second job and ran it. It worked, and so did the installed application.
SOLD.
So, I’ve just spent the last 2 hours polishing that project. Sorting out the theme images, icons and plugging in anything else required into the build process. I’ve just integrated it into my GitLab build YAML using powershell. That’s merrily building installers and the testing on VMs is perfect.
Job done.
User Interface
As I said above. I couldn’t believe how quickly I was up and running with Advanced Installer. The User Interface is more than serviceable and the Wizard I used to create the project worked flawlessly. It’s the usual Windows Ribbon affair which love or hate it, does get the job done.
At no point was I presented with a stack of too much information. The options and sections are laid out sensibly. Obviously, my having installer experience helped as the concepts were familiar already. All in all. No complaints on the UI at all.
One very cool feature is the built in support for VMs. If you go for the Enterprise version you can build your installer and without leaving the tool, fire up a VM and safely test the new installer build. Very cool.
Visual Studio Integration
There is also a visual studio plugin available in the market place. Once my installer was working I decided to get it integrated. I’m not usually particularly fond of top loading my IDE with plugins. I have #ReSharper and some XAML tools but other than that I like to keep it lean. ReSharper is enough of a beast on it’s own.
I did run into an issue here in that I could find a way to create an AI project and import an existing *.aip file. So I jusd created a new project and then hacked it around to point to the existing *.aip file and everything is working. The VS UI is understandably less feature rich than the application but that’s no issue.
I have set it up so the installer doesn’t build from VS (Configuration Manager) as I have my GitLab pipelines for that. But I now have the installer properly integrated into my development loop. Fantastic.
Issues
So far I’ve only encountered a couple of issues. I ran into some really odd certificate code signing issue. A quick search turned up a thread on their forum saying it was fixed … from 2012. Hmm. Their solution on that thread was what was causing the problem for me. I worked around that and now have a fully working build pipeline. The tool UI found my code signing cert and popped it into the drop down for me. But pumping that through GitLab just bombed. Almost certainly a permissions issue and not the tooling. The GitLab build runner runs under a limited account and I’m not going to change that anyway.
Wix Import
Another red flag for me regarding my own installer is that Advanced Installer couldn’t import my WiX. So what do I make of that? Is that a problem with Advanced Installer, a bug shall we say. Or is that due to an issue in my WiX that I’m not aware of, yet it also allows the installer to work? And that’s the crux of it. I don’t know. I could burn through countless hours identifying that “why”, or I could burn through that time and still not know. Is that also an issue that would only manifest on a client machine because, as they say, it works on my machine(s).
Is that risk worth it? I’m not convinced it is.
Reboot Requirement
The only other issue I’ve spotted was around detecting pending reboots. It seems a bit “twitchy” here. That fired and prevented install even when there wasn’t a pending reboot. It also didn’t do it 100% of the time. I’ve turned that off for now as it’s not particularly crucial anyway.
Summary
All in of that achieved in just a matter of 3 hours is amazing. My confidence is much higher. I guess only time, and paying customers, can truly answer that one.
If you never touched installers before and you have a requirement to use WiX and you need to give some estimates for work. Give yourself several weeks just to get up to speed on WiX basics. The more complex your installer the longer it may take. It’s at least as important as your application code. It’s the first thing your customers see …
I can at this stage definitely recommend looking at Advanced Installer. I’ll loop back at some point and post an update.