Walkthrough: Deploying Your Program (C++)
Now that we've created our application, the last step is to create an installer that other users can use to install the program on their computer. To do this, we'll add a new project to our existing solution. The output of this new project is a setup.exe file that will install the application that we've previously created on another machine.
The information in this topic does not apply to Visual C++ Express Edition.
This walkthrough uses Windows Installer for deploying your application. You can also use ClickOnce to deploy an application. For more information, see ClickOnce Deployment for Visual C++ Applications. For more information on deployment in general, see Deploying Applications and Components.
To create a setup project and install your program
From the File menu, click New, and then click Project.
The Add New Project dialog box appears.
Under Installed Templates, expand the Other Project Types node. Next, expand the Setup and Deployment node and click Visual Studio Installer.
From the Templates pane, select Setup Wizard. Type a name for the setup project, such as gameInstaller. In the Solution listbox, select Add to Solution. Click the OK button.
The Setup Wizard will appear. Click Next to continue.
From the Choose a project type pane of the wizard, select the Create a setup for a Windows application option and click Next to continue.
From the Choose project outputs to include pane of the wizard, select Primary Output from game, and click Next to continue.
We do not need to include any additional files in our installer, so from the Choose files to include pane of the installer, click Next.
Review the changes from the wizard, and verify that everything is correct. Click Finish to create the project.
The new gameInstaller project will be listed in the Solution Explorer. This project will list the dependencies that your application depends on (such as the C Runtime Library or the .NET Framework) as well as the project files that are to be included in the installer.
There are many options that can be changed after the setup project has been created. For more information, see Visual Studio Installer Deployment.
Build the installer by selecting it in the Solution Explorer and clicking Build gameInstaller from the Build menu.
Locate the setup.exe and gameInstaller.msi programs created by the previous section. Double click on either file to install the application on a computer.