In this tutorial, we’ll look at creating an installer for a Winforms desktop application using Advanced Installer(Free edition).
Prerequisites:
The only prerequisite for this tutorial is Visual Studio Community edition, go ahead and download the installer here
After downloading, go ahead and install and open Visual Studio.
Next, we want to create a project, we will create a small Winforms application for this demo.
I have created a Winforms application called CurrencyConverter, you can clone the project from my GitHub here
ps: This project runs on .NET 9, so you'll need that particular SDK to run it
Alright, next thing is to navigate to the Advanced Installer page, to download a free trial.
After downloading it, click and run the installer
Follow the prompts and use the default options provided.
If you were able to install the application successfully, it should be launched and you should see this screen.
Next, Make sure the MSI Installer tab is selected, then Click on Visual Studio Application and then click on Create New Project
You'll be ask to provide a project and Manufacturer name. I have named the former Currency Converter and the latter as simply my own name. Then click Next.
Since we're using the free trial, the only extension type we have available is a standard MSI setup file. So you can then click Next.
Now, We'll be asked to choose where the project will reside in your local machine, you can just leave the default values and click Next.
Next, you'll be asked to choose the Visual Studio solution you want to use for this project.
Navigate to whatever folder you cloned the starter project and select that.
And then click the next button
Next, You'll be asked to choose whatever project configuration you application was complied under. Since this is for tutorial purposes, I will select the Debug configuration only as that is where my project was built.
I will also check the Build Selected Configuration before proceeding option, just so we're sure there are no unwanted errors.
Next, we'll be greeted with a screen to select the files that have been detected as output files in our project build. For this part, just click on the Select All checkbox.
Next, is the panel that asks if you want to create both Desktop and Program files shortcut for your application. I will leave these as is and click Next.
Next, you can choose to Launch the Application after install, make sure to choose the application EXE
Next, You'll be asked to select the Installation UI, we'll use the default selection for the purpose of this tutorial
Next is the License Agreement page, if you would like your users to sign a license agreement before proceeding with the installation, you can add that here. We're going to skip this step since this is just a practice application.
You can then click the Finish button as we have now reached the end of the configuration
You should now see all the details of the installer project
There are several options and configurations you can do, but for this tutorial, we're just going to keep it simple and continue with the configurations we have already added. Next build your project by clicking the build button
From the picture above, you can see the build was successful with no errors
Now, to use your created MSI file, you have 2 options, you can either just click the Run button at the top of your application or navigate to the folder you defined earlier as the project output path. I will use the later.
Click on the Open Output Folder options at the top
And we see the MSI file created. You can then click it to installer your application.
When you click the installer you see the Installation UI we configured earlier
You can just follow the prompts to the install the application and click finish when its done
We can then see the application opens up like we wanted
Happy coding everyone.
Top comments (0)