Basic configuration and installation of Windows services

Source: Internet
Author: User

Using Windows Services:
1. New Project--windows Service
2. Write a program in Service.cs
3. Configuration:
3.1. Switch to Design view and select Add Installer
3.2. Switch to the installer ProjectInstaller.cs Design view, right-click the ServiceProcessInstaller component, select Properties, Set account property to LocalSystem
3.3, the basic configuration also has some related properties of the service (service name, description, status, etc.), in the Service.cs Design view properties of the relevant settings, this is not detailed explanation, self-exploration.
4. Installation:
4.1, using the system comes with the InstallUtil.exe program installation,
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe Service.exe Pause
Write the above command as a batch, then execute, and the installation is complete! Pay attention to the path problem!
4.2. Install with SC start system command
4.3, Packaging services
5. Uninstall:
5.1, using installutil.exe/u Uninstall service

5.2. Use SC Delete system command to uninstall the service

Unloading:

Basic configuration and installation of Windows services

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.