1. Create an installation and deployment project
Open vs, click Create Project, select another project type-> installation and deployment-> Installation Wizard, and click OK.
2. Start adding files.
Double-click ApplicationProgramFolder "right-click the blank area on the right and choose add> file to add executable files and corresponding class libraries and components of your application.
Right-click your file, create a shortcut, and copy or cut the shortcut to "user's ''projec'' menu" and "User desktop" on the left. After the installation is complete, a shortcut is generated on "start-> All Programs" and "desktop.
You can also create a shortcut in the "user's ''projec'' menu" and "User desktop" directories and locate your files. As shown in:
Right-click "application folder" on the left to open the Properties dialog box: Remove "[manufacturer]" from the "defaultlocation" path in the property, otherwise, the default installation directory of the installation program will be "C:/program files/your username/installation solution name ";
In the Application folder, you can add its icon, which is an ico-suffixed file. Then you can select the icon in the program and on the desktop.
3. Add the "Uninstall" Function
The preceding section only describes how to generate and install a program. However, the uninstall program function is not directly generated in vs2005. Therefore, we have to use MSI to implement the function. The procedure is as follows:
Add an msiexec.exe file in the C:/Windows/system32 folder. After adding the file, change its name to "uninstall.exe" or uninstall it to make it more like an uninstall program, I changed it to uninstall. Of course, this does not matter. You can change it if you do not change it.
Create a shortcut and place it in "start-program". Next, we need to find the productcode of the deployment project. Click the project name with the left mouse button. Remember to click it with the left mouse button, click the attribute tag. Note: This is not a right-click attribute. The difference is great. Then you can see the productcode.
Open the shortcut Property dialog box that you created, and enter"/X {productcode}" if my is:/X {B06E1931-9A59-49C6-9A6B-9F174DACC104}
Click "generate solution" to generate the installer with the uninstall function.