-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
WiX Cookbook
By :
During the installation, you may decide to populate your database tables with some seed data. For example, you may have a list of U.S. states in which you do business that you'd like to add as static data. In this recipe, we will create a database, add a table to it, and then insert new rows into that table.
Create a new setup project and call it InsertingDataInstaller.
Include an INSERT statements in a SqlScript element to add rows of data to a database. The following steps show how to do it.
Add SqlExtension to the project by right-clicking on the References node in Solution Explorer and selecting OK after navigating to Add Reference... | Browse | WixSqlExtension.dll | Add.
Add the SqlExtension namespace to the Wix element:
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:sql="http://schemas.microsoft.com/wix/SqlExtension">
We're going to store all our SQL commands in a file. So, use Notepad to create a file...
Change the font size
Change margin width
Change background colour