August 26, 2014

WIX – A “Hello World” example (via the command line)

Creating an msi, you need 3 things


You can find all my latest posts on medium.



I am now going to create a very simple MSI that will install a software that I’m going to call “CodingBee“. This MSI will:

  1. Create a folder called “CodingBee” which will be under “c:\program files” folder
  2. Place a single text file in this folder, called HelloWorld.txt.  This file only contains 1 line which says “Hello World”


Here’s my approach:


  1. Create a folder called “CodingBeeFolder” in a convienent location (in my case I’ve created on my deskop)
  2. Create the HelloWorld.txt file and save it inside   the CodingBeeFolder folder.
  3. Create the wxs file, which I have called CodingBeeXML.wxs, and in the file, I inserted the following xml:
  4. Open up a powershell terminal and cd into CodingBeeFolder.   At this stage if you view this folder’s content, you should see:
  5. Now, while you are still in the CodingBeeFolder, run the following command:
  6. Check that running this command has resulted in the “Product.wixobj” file being generated. the wixobj an intermediary file that get’s produced as part of the MSI file generating process.
  7. Run the following (light.exe) command:
  8. This should have now generated the