Create an installation file

Source: Internet
Author: User

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.

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.