Mohammed Atef’s Technical blog

WIX Introduction

What is WiX?

WiX is a set of tools and specifications that allow you to easily create Windows Installer database files. The WiX tools model the traditional compile and link model used to create executables from source code. For WiX, source code is written in XML files. These files are validated against a schema, wix.xsd, and then processed by a preprocessor, compiler, and linker to create the desired result. WiX has been designed to allow for the easy creation of multiple Windows Installer databases from a small set of source files. You can use WiX both on the command line and in the Visual Studio development environment.

File Types

There are many file types in WiX that are generated from different tools in the toolset. At the highest level, all input files and intermediate files for WiX are XML files. The output is in the form of standard Windows Installer database files.

Let’s go quickly to see all WIX file Types





WiX Include File

A .wxi file is analogous to .h files for C++. The root element of this file is <Include>. Everything under the root element will be inserted inline when this file is included in another source or include file.


WiX Localization File

A .wxl file contains a set of strings used for localizing a product into a specified culture. The root element of this file is <WixLocalization>. The culture is specified by setting the Culture attribute on the <WixLocalization> element.


WiX Source File

A .wxs file is analogous to a .cpp file for C++. The Root element of this file is <Wix>.


WiX Object File

A .wixobj file is created by the compiler for each source file compiled. The .wixobj file contains one or more sections that, in turn, contain symbols and references to other symbols.


WiX XML Output File

A .wixout file is created by the linker which represents the result of linking a set of object files. The .wixout is an XML representation of the final output.


WiX Library File

A .wixlib file is a library of setup functionality that can be easily shared across different WiX-based packages by including it when linking the setup package.


WiX Debug File

A .wixpdb file is created by the linker for each final output. It contains the debugging information.


WiX XML Patch File

A .wixmsp file is the XML output generated by linking object files in a patch build.


WiX Transform File

A .wixmst file is an XML representation of the difference between a pair of final outputs or XML outputs.


Windows Installer Installation Package

An installation package file (.msi) is the basic unit of installation for the Windows Installer.


Windows Installer Merge Module

A merge module file (.msm) is used to share setup logic across different .msi packages. A merge module can be created by one development team, then merged into another development team’s .msi package..


Windows Installer Transform

A transform file (.mst) is used to apply changes to an .msi file.


Windows Installer Patch Creation Process

A patch creation properties file (.pcp) is used as an input to the patch building tools provided in the Windows Installer SDK.

 Structure of .wxs files
All .wxs files are well-formed XML documents that contain a single root element named <Wix/>. The rest of the source file may or may not adhere to the WiX schema before preprocessing.
The root <Wix> element can contain at most one of the following elements as children: <Product>, <Module>, and <Patch>.
It is important to note, that there can be only one <Product> or <Module> or <Patch> section element per source file because they are compiled into special sections called entry sections.
Symbols and references
Every symbol in an object file is composed of the element name plus the unique identifier from the “Id” attribute. Symbols are important because they can be referenced by other sections from any source file.
Structure of the .wixobj file
A .wixobj file is created by the compiler for each source file compiled. The .wixobj file is an XML document that follows the objects.xsd schema defined in the WiX project.
Now I think you have a good overview about WIX.i will write some series of articals for WIX and waiting you comments.

I hope this help.


April 12, 2009 Posted by | .Net 2010 | , , , , | 1 Comment

Debug XSL

All of us use XSL and XML,but do you know how to debug XSL files via .net(2.0 or above)?

Really it’s very simple but I think it’s very useful also.using the following few lines of code you can debug XSL.

 XmlTextReader xmlSource = new XmlTextReader(“XMLFile1.xml”);
XPathDocument xpathDoc = new XPathDocument(xmlSource);
XmlTextReader xslSource = new XmlTextReader(“XSLTFile1.xsl”);
//note if this parameter eqaul false you can’t debug
xsltDoc = new XslCompiledTransform(true);
StringBuilder sb = new StringBuilder();
StringWriter sw = new StringWriter(sb);
xsltDoc.Transform(xpathDoc, null, sw);

As you see it’s very simple just use XslCompiledTransform instead of  XslTransform

Note you can also debug XSL via

February 11, 2009 Posted by | Developement | , , , , | Leave a comment

& operator in xsl

hey,if any one wants to use the & operator in his query string you can use &amp;  

<a href=”default.aspx?val1={$var1}&amp;val2={@var2}”><xsl:value-of select=”@name” /> </a>

February 4, 2009 Posted by | | | Leave a comment