Hot Fixes

Online Help





Wix# - managed interface for WiX

Wix# deployment framework. Version (v 0.1.43). Copyright (C) 2009-2013 Oleg Shilo.

Download package with WiX binaries and sample, Reference Guide or source code from CodePlex

You can register for e-mail notification on CS-Script updates:


Send you general feedback (comments, features for "wish list") to:

Send your bug reports to: 

Wix# (WixSharp)  is  a new member in the CS-Script family. Wix# is a managed interface to WiX (Windows Installer XML toolset for building Windows installation packages from XML source code).

Wix# allows building a complete MSI or WiX source code by executing script files written with the C# syntax. It uses a C# class structure to mimic WiX entities and their relationships in order to produce a valid deployment model.


You can find detailed description for the reasons behind Wix# in this article: http://www.codeproject.com/KB/install/WixSharpArticle.aspx.

At this stage Wix# is still under development and the only complete documentation available now is white papers available from CodeProject (the link above) and API Reference CHM help (the link at the top of the page). 


This is an example of a simple Wix# script:

using System;
using WixSharp;

class Script

static public void Main(string[] args)
var project = new Project("MyProduct",
new Dir(@"%ProgramFiles%\My Company\My Product",
new File(@"Files\Docs\Manual.txt"),
new File(@"Files\Bin\MyApp.exe")));

project.GUID = new Guid("6f330b47-2577-43ad-9095-1861ba25889b");


One of the most intriguing features of Wix# is an ability to define/implement managed Custom Actions directly in the script file:

using System;
using System.Windows.Forms;
using WixSharp;
using Microsoft.Deployment.WindowsInstaller;

class Script
    static public void Main(string[] args)
        var project = new Project("CustomActionTest",
new Dir(@"%ProgramFiles%\My Company\My Product",
new File(@"Files\Docs\Manual.txt"),
new File(@"Files\Bin\MyApp.exe")),

                  new ManagedAction("MyAction"));


public class CustonActions
    public static ActionResult MyAction(Session session)
        MessageBox.Show("Hello World!""Embedded Managed CA");
        session.Log("Begin MyAction Hello World");

        return ActionResult.Success;

The downloadable package contains collection of Wix# samples covering the following development scenarios:

  •     Install file(s) into Program Files directory
  •     Change installation directory
  •     Install shortcut to installed file
  •     Install shortcut to installed file into Desktop directory
  •     Install "Uninstall Product" shortcut into "Program Menu" directory
  •     Install registry key
  •     Show custom licence file during the installation
  •     Launch installed application after/during the installation with Custom Action
  •     Execute VBScript Custom Action
  •     Execute Managed Custom Action
  •     Execute conditional actions
  •     Registering assembly in GAC
  •     File Type registration
  •     Setting/Reading MSI properties during the installation
  •     Run setup with no/minimal/full UI
  •     Localization
  •     Major Upgrade deployment
  •     Customization of setup dialogs images
  •     Conditional installations
  •     Building and consuming Merge Modules
  •     Simplified Managed bootstrapper for UI based deployments
  •     Simple Native bootstrapper

Copyright (C) 2004-2013 Oleg Shilo