- Visual Studio 08/10 (cannot be express editions)
Adding the wizard.
Firstly you should have the project you’re looking to create an installer for open. Once open we need to add our Setup Wizard by going to File>Add>New Project, and selecting Setup Wizard from the "Setup and Deployment" category.
Name the wizard according to your application(Adding "Install" to the end is nice for the user, e.g. "AppName Install")
You will now be presented with a welcome screen which asks you to click next. Now we have the "project type" screen which presents us with four options of how the files will be installed on the computer. For this tutorial we are creating a normal Windows applications so we'll chose option one. The next screen is the "project output" screen which asks what project output we want to include. For this tutorial all we'll need is Primary output(the exe).
Note: If you click on the other options a small description will be shown.
With the next screen we are allowed to add files such as readMe or html pages. I’m going to add a readme just because I want to, I'll then press next.
All that left now is to check the last screen to confirm everything is filled in correctly and press next.
If everything went well you should see this screen.
This is where we'll edit some details to install the program where and how we want.
First let's add a shortcut to the desktop and program menu. Double click the "User's Desktop" folder from the left and you'll be shown the content of the folder on right(blank atm). Right click this blank area and click "Create New Shortcut" and a new dialog will open. With this dialog we must select what we want the shortcut to connect to, in this case the application, so in the dialog double click the "Application Folder" and select "Primary output..." press ok and name the shortcut(The text you want show on your desktop icon).
Now lets add an icon to our shortcut! Right click your shortcut and open the properties window, from here choose "(browse)" from the icon property. Once again a dialog will open, from this dialog we go into the application folder again and click add file. We then browse for the icon we want and press ok.
Now you can repeat the process for the "User's Program Menu" folder to place a shortcut on the program menu.
Now that we have some shortcut's lets change the installation path of our files. Right click the "Application Folder" and open the properties window. Near the middle you should see "DefaultLocation" filled in with
"[ProgramFilesFolder][Manufactur]/[ProductName]" this sets the file path to
"C:\Program Files(x86)\Micorsoft\SetupWizardName", but as it turns out you probably don’t work for Microsoft and may not want your program folder named after the Setup Wizard. Let’s change the value to "[ProgramFilesFolder]MyCompanyName/MyAppName". There, now you have your files right where you want them.
Once you’re done editing and adding, right click your Setup Wizard in the solution explorer and click Build!
There you have it, that’s the basics of creating a setup wizard for your application! If some people would like I could make a tutorial going into some more detail about other options of the wizard e.g.
Congratz you now have an installer worthy of being online! Your installer can be found in "Wherever\Visual Studio 2008(or 2010)\Projects\ProjectName\SetupWizardName\Debug\".
Any questions, comments, or rep welcome.
Thanks and good luck ~ Committed.