How to Build a Windows MSI Installer with Microsoft Visual Studio
Before releasing a Windows software, which is not open-source, we have to package everything that we have done in a Windows installer. In this post, I’d like to share how to build a Windows MSI installer with Microsoft Visual Studio 2010.
Creating a Basic MSI Installer
Click Setup and Deployment, and choose Setup Project:
Click OK and check the project layout:
Right-click the Application Folder to add a new folder WebTWAINDemo, and drag all Web TWAIN project files into the folder:
Change values of Author, Manufacturer and ProductName:
Build the project as release version:
Double-click the Setup1.msi to launch Setup Wizard:
Now, you can verify whether the application has been successfully installed to the target folder.
Writing Values to Windows Registry
When installing applications, some important information needs to be written into Windows Registry. Let’s click registry editor, and create Dynamsoft->WebTWAINDemo->Version 220.127.116.11:
Build the project, and launch the installer. After finishing installation, check the registry values:
The version data has been created. If you run the installer to remove the application, all registered information will also be deleted from Windows Registry. Note: if some resources are still in use, it may fail to clean the Windows Registry.
Editing User Interface
It’s pretty easy to customize the user interface for installation process. Click the button User Interface Editor, and add dialogs you like: