Go VS Production installation package

Source: Internet
Author: User

The first version of the project came out, to do an installation package, have not done before, online look posted, wrote a, summed up, according to the needs of this project, not written too complex, may not be perfect, only for reference.

Start a new project by opening VS2010 "file"

Create a Setup Project XXX

Under "File system on target computer" We see "Application Folder", "User's Program menu", "User desktop". Right-click the Add folder (the folder that contains program-related components generated under the installation path after installation) in the application Folder

Add the Test Installer folder to this column, right-click on the Test Installer folder, select Add to add the components required for all programs according to your project needs, and add XXX.exe, XXX.dll, icons, and so on in this example

To implement the uninstall function, you need to add the C:\Windows\System32\msiexec.exe program to the Test Installer folder, and then proceed

Next, make a shortcut to the main program XXX.exe and Msiexec.exe, respectively.

Similarly, add a folder to the user Program menu and cut XXX.exe and Msiexec.exe shortcuts to the folder, so that when the user taps the Start menu, they will see the files of our installer, provide a shortcut to run the program, and a shortcut to uninstall the program.

Next, set the parameters for the uninstaller: Under the solution, click the installation project name, go to its Properties page, locate its ProductCode property value, copy the property value, and in this case the property value is: {226d41bc-a197-41b0-9156-2ec489089d9 9} (that is, the ID of this installation software)

Then, in the Arguments property entry on the Properties page of the shortcut that is built by the uninstaller, assign its value to:/x{226d41bc-a197-41b0-9156-2ec489089d99},/x as the command, followed by the ID of this installed software, so that the uninstall Program to know when the runtime should uninstall that software.

Finally, add a shortcut to the main program on the user's desktop

Finally, we will set up the relevant properties, because this software is developed under. NET, if the target computer does not have the corresponding. NET library files installed, the program will still not run after installation, so you need to set the properties of this installer, select this installer, right click, go to the Properties page.

Click Prerequisites

The program will automatically identify what is needed. NET Library files and installers, by default, when specifying the installation location option for prerequisites, the first item means that at the time of installation, if the target computer does not. NET library file, the installer will prompt the user to download the appropriate one from the Web. NET Library files. The second item means that it will be corresponding directly from the local computer. NET library files to the Debug directory of this setup program, if the installation program detects that the computer is not installed when the target computer is installed. NET library file, install it first. NET library files, and then install the software without downloading it. NET Library files. So select the second item in my program and click OK.

Finally, the installation package is generated, and the Setup.exe file found in the Debug directory is our installation package.

The most basic installation program is these, if the complex large-scale application may involve the registry and launch conditions, install the boot interface and other properties of the settings, we in the installer right-click on the selection of the view, can be in the relevant settings, here is no longer detailed, later as needed to supplement. Xiao Gong Gaocheng, shortcomings, welcome to correct me ...

Go VS Production installation package

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.