. Net installation package creation [including uninstall modules] (illustration)

Source: Internet
Author: User

1: Create an installation and deployment project
Open vs, click "Create Project", select "other project type"> "installation and deployment"> "Installation Wizard" (the same is true for the installation project), and click "OK" (for details, see)
The image of this topic is as follows:

2: Installation Wizard
Open the Installation Wizard, click Next, or click Finish.
3: Start production
After the installation wizard is complete, you can enter the project folder:
Double-click"ApplicationProgramFolder"Right-click the blank area on the right and choose add> file to add the executable files and corresponding class libraries and components of your application.

Right-click your executable file, create a shortcut, and cut or copy the shortcut to "user's 'project' menu" and "User desktop" on the left.
After the installation and installation of the installer are complete, the program shortcut will be generated on "start-> All Programs" and "desktop.

Right-click "application folder" on the left to open the Properties dialog box:
Set"Defaultlocation"Remove" [manufacturer] "from the path,
Otherwise, the default installation directory of the installation program will be "C:/programm file/your username/installation solution name ";
Open solution manager, right-click your solution name, and select properties:
On the open properties page, select"Required",

On the System essentials page, select the following items. This is very important !!!!! 1 !!!!!
After the installation is selected, the generated installation package contains the. netframework component. (this option is not selected by default)

Now, 99% is complete, and then click "generate-> Generate solution". Ha, generation successful!
4: Production completed
Now open the debug folder in the solution folder and you will see the generated Installation File.

[Continued] about adding the "Uninstall" Function
The aboveArticleThis section only describes how to generate and install the SDK,
However, vs. net2005 does not directly generate the uninstall program function,
So we have to use MSI to implement it,
I will not talk about the principle. I will search for a bunch of images online. I will only talk about operations,
[1]: when setting the purpose of your application, add an msiexec.exe multiple times,
This file is in the C:/Windows/system32 folder,

After the program is added, change its name to "uninstall.exe" to make it more like an uninstallation program ",
Of course, this does not matter much. It can be changed without modification.
Then create a shortcut for him and put it on the desktop or "start-program,
I chose to put it in the Start menu, and what we want to do below is to find the productcode of the deployment project,
Click the project name with the left mouse button, remember to click the project name with the left mouse button, and then click the attribute tag. Note: it is not a right-click attribute,
This is very different. Now you can see the productcode,

Then open the shortcut Property dialog box that you created,
Enter "/X {productcode}" in the aguements attribute }",

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.