In windows operating systems MSI packages are used to deploy programs. Basically there are two type of deployments, normal desktop program deployment and web deployment. There are many third party programs are available to create MSIs. But if you don't want use to them, this article will help.
The easy way to create a MSI is using Microsoft Visual Studio. Using Visual Studio it is possible to create both desktop program deployment and web deployment packages. But there are some limitations in Visual Studio. If you want a very customizable version it is recommended to use Wix Toolset. But for the web deployment wix toolset is very hard to use.
- In Visual Studio Click
-
>>>>>>> File >> New >> Project
- Expand Other Project Types and click Setup and Deployment
-
>>>>>>> Select Setup Project. Give a name to project and click OK button
- Select Setup project and go to properties
In above properties Product Code and Upgrade Code is important. Both Product Code and Upgrade Code are GUID values. Product Code is used to identify the currently installed version of the package. Upgrade Code is used to identify the product. Therefore when the Version is changed it is recommended to change the Product Code but Upgrade Code must not change.
- Go to Solution Explorer and click the File System Editor button
- Go to Solution Explorer and click the Registry Editor button
- Go to Solution Explorer and click the User Interface Editor button
- Go to Solution Explorer and click the Custom Actions button
Custom actions are used to perform additional tasks which cannot be fulfill from basic installation. As an example executing a database script is cannot done in a basic msi. For this kind of purpose we have to create separate executable or custom action and add as a custom action in relevant event.
This is a quick start guide for creating MSI packages. There are lot of concerns in creating MSIs more information can be found from following links.