Visual Studio installation package

Source: Internet
Author: User

1. click File> new project.

Select the setup project in other project types-> setup and deployment. Enter the installation package name setupmyapp In the Name field, and select Add to solution for solution. The location remains unchanged. Click OK.

2. Go to file system Editor (select setupmyapp in Solution Explorer. This option is available in the toolbar above)

Right-click Application folder, select Add-> project output, select your project, select primary output, and select OK. The DLL or EXE file generated at the end of the project is added.

You can also add other files required for installation. If you want to add a folder (if there are many subfolders), you can drag the folder from your computer to application folder.

3. Add shortcuts

Right-click primary output from Xpress in application folder and select create export cut to primary... In this way, the shortcut of the main program is added, renamed as MyApp 1.0, and then cut to users desktop.

Add a folder MyApp 1.0 to the user's programs menu, and create a shortcut to cut it to it.

In this way, there is a main program on the Start menu and desktop.

PS: After installation, I found that the main program icon is not what I want. If I want to change the icon, there is an icon in the properties of MyApp 1.0 shortcuts, click Browse. You can select one from the icon added before application folder or from your computer.

4. added the uninstall program.

Right-click Application folder and choose add-> file... find msiexec.exe in system C:/Windows/system32to add

Create a shortcut, change the name to uninstall MyApp, and cut it to users programs menu-> MyApp 1.0

Select setupmyapp in Solution Explorer and copy the prodectcode: {415878ef-605f-4bb0-a41f-a57f92a5d439} in the property}

Select uninstall MyApp, enter/X space in the arguments field, and then paste it.

5. Add associated programs

Click Properties in Solution Explorer. In the displayed dialog box, select prerequisites to check. NET Framework 2.0, Windows Installer 3.1, and other associated programs.

In specify the install location for prerequisites, Select Download prerequisites from the same location as my application

6. Set the installation language and Path

In setupmyapp attributes, localization can select a language, manufacturer can fill in the company name, productname can fill in the MyApp, etc.

 

Finally, compile.

Related Article

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.