C # installation package (automatic uninstall of earlier versions)

Source: Internet
Author: User

I. Version Number upgrade

1. productcode and version (version is higher than the previous version, for example, 1.0.0 is 1.0.1 now ),
2. Keep upgradecode unchanged (when removepreviousversion = true is set, it is used to find and uninstall the old version)
Ii. Configuration version check

1. Set detectnewerinstalledversion to true (the new version is automatically detected. If a later version is installed and a later version is installed, the system will prompt you not to install the earlier version ),
2. Set removepreviousversion to true (when a higher version is installed, the earlier version is automatically uninstalled. If it is false, two identical installation records will appear when you add or delete the version, if you want to retain some files during uninstallation, set the attribute value of the corresponding file to parmanent = true)

Bytes ---------------------------------------------------------------------------------------------------------

The version upgrade can be completed in the above two steps. If you need other operations, refer to the following

Bytes ---------------------------------------------------------------------------------------------------------

3. Add a registry identifier

Write the installation flag key value in the Registry Editor (used to check whether the software is installed during the next installation) and the installation path key value (for the next installation to get the last installation path can do the corresponding operation), this is not important.
4. Add custom operations

Search for the target computer/Add a registry in the startup condition editor (mainly used for an installation identifier and installation path), and then pass the property value to the main output from setupinstall (activity)
(Parameter value:/productcode = [productcode]/regeditsetupvalue = [regeditsetupvalue]/regeditsetuppath = [regeditsetuppath]/targetdir = [targetdir])
To be provided to the install. CS installation class.

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.