C # Windows Services One project installs multiple services

Source: Internet
Author: User

Creating a Windows service does not explain, and the other great gods write too much. Here is a tutorial that only writes a project to install multiple services. such as: http://www.cnblogs.com/zzgblog/p/4595839.html

Start by creating multiple services. Name everyone at random. I'm using a project I've created.

With my creation as an example, I created two service files

Open each service file and right-click Add Installer. Click to see how to add the installer

Specifies the relationship of the installation control to the service through the servicename in the ServiceInstaller1, ServiceInstaller1 property.

Finally, add the service in the main function

Well, when the installation is complete, there will be two services.

Provides a batch file for installation and uninstallation. Windows batch File

Finally, let's talk about how servicename in the ServiceInstaller1 property is named.

C # Windows Services One project installs multiple services

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.