Book Image

WiX Cookbook

By : Nicholas Matthew Ramirez
1 (1)
Book Image

WiX Cookbook

1 (1)
By: Nicholas Matthew Ramirez

Overview of this book

WiX is a dialect of XML used to make installers for Windows. Its declarative style avoids the complexity and limitations of procedural code, providing you with everything you need to package up an entire application into a single MSI file. This book gives you a good overview of WiX's capabilities to develop your own installer packages with functionalities beyond those available in Windows Installer. In the recipes of this book, you will see ways in which WiX can cut down on your installation time and help you streamline your deployment processes. You will see how to make customized installer UIs, write custom actions, create shortcuts, and also set your application as the default for a file type.
Table of Contents (15 chapters)
14
Index

Creating an ODBC data source for a SQL Server instance

Microsoft Open Database Connectivity (ODBC) is a long-standing and established API for connecting to a database. Although there are alternative .NET-specific libraries, such as Entity Framework, ODBC is more general purpose and fits well into an environment where a variety of languages and technology stacks are used.

Many languages have libraries that can take advantage of ODBC. For example, C# can use either ADO.NET or the classes under the System.Data.Odbc namespace to connect to an ODBC data source. In this recipe, we will set up a data source to connect to a SQL Server instance called MySqlInstance.

Getting ready

Create a new setup project and call it OdbcDataSourceInstaller.

How to do it...

Using the ODBCDataSource element, create a data source for SQL Server, as shown in the following steps:

  1. Add a component to the project that will contain our ODBC data source:
    <ComponentGroup Id="ProductComponents" 
                    Directory...