Logo

WixApp -- A program That Prepares a Wix Source File

This project started as a way to remember how to construct a decent installer using Wix. The syntax of Wix is just bizarre enough that every 6 months or so when I need to create one I had to learn it all over again. So WixApp was constructed to provide a simple method for constructing a Wix input file. That is then compiled using Visual Studio in the normal way and an installer is created.

Wix is a very complex product, WixApp is very simple. There are only a few things that it can do:

  • Accept files that need to be installed in Progarm Files (x86)
  • Create Shortcuts (when requested) on the start menu and the desktop
  • Create one or more directories as needed into which files are placed in Program Files
  • It can create up to two levels of directories in Program Files and the Start Menu
  • If requested it will append a path to the system path
  • The version number may be retrieved from an executable for the installer to use during installation
  • It will create an uninstaller that will remove all of the files and directories that it creates

When WixApp starts it presents the following dialog box: WixApp
One can start a new project, open an existing project, save all the files produced or just save the wxd file (the data that this application produces). Save all files also produces a product.wxs file.

There appears to be three sections to the dialog box, but in actuallity there are only two. The bottom (i.e. Feature) section has a subsection (i.e. Component).

Product Section

There are four edit boxes in the Product Section

  • Product Name -- The name used for the wxd file
  • Company Name -- The name of the entity producing the application
  • Installer Name -- The main name of the msi file (i.e. <Installer Name>.msi
  • Control Panel Icon -- Usually the icon found in the project resource directory for the application

Feature Section

A feature is a collection of files that share a common program files directory and start menu. WixApp doesn't care why they share these directories (a start menu is a directory too).

The Feature Name edit box is actually a drop down list. Selecting New adds another name to the list. Once the name is defined, the names put in the other edit boxes are attached to the specific feature name.

Components

A Feature may contain multiple components which are specified in the Component Section. Once a name is chosen for a component (using the New Button) the remaining edit boxes in the Component section are tied to the named component. The attributes of a component are:

  • Path -- The full path to the file
  • In Start Menu -- file appears in the start menu when checked
  • Desk Top -- Link placed on desktop when checked
  • Version No -- Installer used version number in file when checked
  • On Path -- File is placed on the Environment Variable Path
  • Login Startup -- App is started when the user logs into the PC
  • Win Version -- At the moment only Win7 is tested. WinXP and Win2K were legacy choices.
  • Icon -- Optionally specify an icon to use with this file.

Each component defined is kept in the Name drop down list. To edit a component, just select the name and the attributes for that component will return to be edited. Same thing happens for a Feature. If there are two or more features, just selecting the name of the feature from the list will produce the attributes of the feature and all the components of the feature.

Finishing

When all the features have been defined the "Save All Files" will produce the product.wxs file and the WixApp file: <Product Name>.wxd. The next time changes need to be made to the product.wxs file, the <Product Name>.wxd needs to be opened to edit the data used to produce the product.wxs file.