This week I set off with the goal of making one of our web applications alot easier to deploy. The tools I chose were –
- Web Application Installer (WAI)
- Wix (Windows Installer XML)
- WixEdit
I’d played with all three before but never really got past prototype stage. I’ve spent the last day learning wix and all the elements relevant to me. The Web Application Installer is collection of scripts and a template for different types of web applications. Firstly you use WAI to generate a list of files to install and the use WixEdit to edit that list and many other properties of the wix installation. Once happy with the configuration of the installation WixEdit will generate an msi for installation on your target machine. They truly are an excellent collection of tools. I now have an msi installer that sets up a web site in IIS, sets the ASP.NET version to 2, sets all the required permissions, creates a DB in SQL Server Express (specifying where to save the mdf and ldf files too) and changes the connection string in web.config accordingly. Todays quota of job satisfaction has now been achieved – saving about an hour per install (I’ve to install this app 28 times for different clients so the work was definitely worth while).
One huge pit fall which made me silly amounts of angry was that the SQL script you use to generate the tables and initial data for your database MUST be saved in Unicode (UTF-8). If it’s not then wix won’t be able to read it. I lost 3 hours yesterday with this!!!! as SQL server management studio express by default saves to UCS-2 Big Endian. Very little documentation on this fact so hopefully this post will help a little.