TL;DR – A ranting post about Wix and MSI packages
I woke up in cold sweat feeling terrified. I knew this day will not be a good one. I couldn’t explain why, I just knew…
I received horrible news this morning – I was assigned with a task to create a windows deployment package (MSI) that will install a server to IIS with a specific file layout and configuration.
At this moment I know nothing about installation packages on Windows, this is going to be an interesting day.
After spending an hour comprehending the horrible news, I figured I need to learn what the hell is a Windows Installer Package (MSI) and how do I go about creating one. I figured i’ll invest couple hours in an online course, so I went through most of this course on pluralsight (god bless the double speed streaming):
I think I am starting to understand what is going on.
Windows has a very old installation mechanism built in to it. To perform an installation, that mechanism needs an MSI package that contains all the information for that particular installation.
Oh, ok, but how do I create such MSI package?
There are several ways to create those MSI packages. The most popular way is to use WIX Toolset (no, not the web site creation wix). WIX stands for Windows Installer XML. So we use WIX to create an MSI that will be used by msiexec.exe to perform the actual installation. Phew, try saying this 20 times in a row.
Found some useful tools:
Orca – this tool enables me to explore the MSI file and see what is actually stored in it.
InstEd – this is like Orca but has additional features like MSI package diff between different version of MSI.
Assuming I have an MSI package, to install it with extended logging and debugging info, I should execute this with the following command:
msiexec /i mypackage.msi /L*vx “c:\msilog.txt”
Nothing works… I hate Wix and i hate MSI, they ruined my life…
It finally worked!
I love Wix!
I love MSI!
Time to unwind, have a cold beer and watch a good TED talk…
All in all it was an interesting day…