Install Mysql Using Inno Setup Skin
Lately I was told at work to create an installer for our new product. Till that moment I used to create exe installers with which has many advantages: it’s easy-to-use, powerfull and (the most important 🙂 ) I used it so many times that creating a new installer is a matter of minutes. But this time I heard a big ‘no-no’ for an exe – it had to be msi. I created a simple “Setup Project” in Visual Studio, played with it for a while and hoped that will work as expected. Well, it worked, but I was told it needed some customizations (graphics, custom dialogs, launching the installed application after install). After doing some googling I was able to do all those things by editing the setup project and modifying the output MSI with Orca.
But because every time I needed to create that installer for the new version I had to do some things (for example in Orca) manually – I really hated this solution. So I used google again and I found a really cool, freeware toolset called which does everything I needed. You just create a XML-like file describing the installer and the toolset creates the MSI for you. Our goal We will create here a simple MSI installer for our program (called Sample App). The installer will: • allow the user to select the installation directory • create a program folder in the Start->Programs menu • show license agreement dialog • have customized graphics • give the user the option to launch our application after installing it • install the application for all users One thing to note – there are two versions of WiX available – v2 and v3. As v3 is still in beta stage, I used v2 at the beginning. But then I tried using the beta and it occured to be simpler to use and so much more powerful that I haven’t returned to v2.
#4 Posted May 6, 2008. Many times trying to do things all in one.exe/app causes complications. I use Inno Setup which has an UninstallRun section that makes it convenient. To run an app before uninstalling. I include a generic app killer in the install. That takes a command line param for the program to kill.
So I recommend using the WiX 3 (as I will do in the examples below). A tiny bit of theory The are some good WiX tutorials on the Internet that will give you more in-depth knowledge about WiX and MSI than this little article. I recommend reading for a start. Here I will just show you how to create your first MSI installer with WiX, without worrying about more advanced features and background details.
First some basic concepts: • our application is a product. Static Ip Changer Program Pro more. It’s identyfied by two unique GUIDs.
Product GUID changes every time you change the version of your app. >candle.exe SampleApp.wxs >light.exe SampleApp.wixobj Play with it for a while, check if it installs the executable into the Program Files subdirectory, if you can uninstall the application (and if it’s actually removed). Application folder in Programs menu Ok, we installed our product, but the user has to manually navigate to its home directory to launch it. We really should create a folder in Programs menu. Here is how we do that. First we have to create a subfolder in Program Menu.
Add the following Directory structure as a child of TARGETDIR directory tag: This would create a folder we wanted. We have a new component responsible for creating this directory. Add it to our ‘Complete’ feature. We create also a dummy registry entry.
This is required because without it light would complain about ICE38 error. This is a workaround 🙂 We want our shortcut to have an icon. We can define it this way: This can be put before Feature tag. Now we have everything that’s needed to create a shortcut in ‘ProgramMenuDir’ folder.
To create it we to put this inside out File tag: Adding and customizing the UI WiX offers some predefined user interfaces. We will use InstallDir, which shows license agreement and allows the user to specify the installation directory. To add this interface place the following two lines (for example after Feature closing tag): While creating the installer we have to use the extension containing our UI. Use the following command. >light.exe SampleApp.wixobj -ext WixUIExtension That was pretty simple, wasn’t it? Now we can customize the interface a little bit.
First we can provide the our own license. It should be in RTF format.
I assume the file is called OurLicense.rtf. You can also change the graphics (I really don’t think the default red skin looks good). To do so create two bitmaps. The first is for the welcome dialog. It’s size is 493×312 pixels, call the file dlgbmp.bmp. The second image is the top banner visible on the rest of the dialogs.