Skip to content

Latest commit

 

History

History
89 lines (60 loc) · 4.47 KB

gettingstarted.md

File metadata and controls

89 lines (60 loc) · 4.47 KB

Getting Started

A Little Background

Let's start with an example; personally I write a lot of plugins for Autodesk's Revit, a 3D modelling software. These plugins are written in C# and ultimately produce a bunch of mostly DLL files, something like this:

Simple Wix

To install this on a user's machine, I just just need either the individual files or the whole Photobooth folder to be copied into the right Autodesk folder under a user's Roaming\AppData folder.

Simple Wix

But when you go to acually distribute these files, a number of questions start coming up, like 'how do I make sure the user puts them in the right spot?', 'how do I update those files when new versions are released?', 'what happens if it's interrupted?',and 'how does the user remove it cleanly and easily?'

Thankfully we're not the first people who needed to solve these problems, and the most reliable solution on a Windows machine is to integrate with the Windows Installer Framework by creating .msi files.

Simple Wix

That being said, the Windows Installer Framework is quite low level, with a number of complicated steps and registries and tables to manage, so it's typically not used directly, but through intermediary frameworks.

One of the most reliable and robust ones is the Microsoft published open source WiX framework. While it works reliably and is easy to debug, imho, it's a little too low level for many simple development cases. That's why I created the Simple-Wix utility to create your WiX files for you. That way you get all the benefits of WiX, without the hastle of actually writing WiX.

Simple Wix

Quick Start

To package my files up for installation, I just need to follow these steps:

  1. Download and install the WiX Toolset.

  2. Download the SimpleWix.exe file somewhere on your computer, I'm going to put it right next to my installation folder to make writing relative paths a little easier:

Simple Wix

  1. Generate a manifest file for your project, I'm going to use the command line and call simplewix.exe init to walk me through this:

Simple Wix

Simple Wix

  1. Now that you have a manifest, you can simply run simplewix.exe from the the command line with no arguments, or double click on it in file explorer and it will generate several intermediary files for debugging along with your completed .msi file!

Simple Wix

Simple Wix

  1. And that's it, simply run your msi file, click "next, next, next" like always, and those files will be installed on your machine with proper registration for clean upgrades and uninstallations.

Simple Wix

Simple Wix

Simple Wix

Simple Wix

Simple Wix

And that's it for a super simple installer. But read on to find out the various options available to customize your installation (like how to change the default license, and images).

One Last Note: Hang onto your manifest file, and specifically the GUIDs created by both the UpgradeCode and the ProductCode. These two GUIDs are what uniquely identify your product to Windows so that it knows when to upgrade vs create a new installation. If these change Windows will see your two versions as completely unrelated applications.