C#window Service creation and deletion

Source: Internet
Author: User

Select the ServiceProcessInstaller1 component, view the properties, set account to LocalSystem

Select the ServiceInstaller1 component to view the properties

Sets the value of the servicename that represents the name in the system service

Set StartType, if manual is started manually, by default stop, if automatic for auto start

Set description, Add service description

Enter CD C:\Windows\Microsoft.NET\Framework\v4.0.30319 carriage return

To switch the current directory, it is important to note that in the C:\Windows\Microsoft.NET\Framework directory there are many similar versions, specifically to which directory to see the project's operating environment, for example, the result is. NET framework2.0 need to input CD C: \ windows\microsoft.net\framework\v2.0.50727

Input InstallUtil.exe E:\TestApp\Winform\WinServiceTest\WinServiceTest\bin\Debug\WinServiceTest.exe Carriage return

Description: E:\TestApp\Winform\WinServiceTest\WinServiceTest\bin\Debug\WinServiceTest.exe represents the exe file location for project generation

Uninstall is simple, open cmd, direct input SC delete winservicetest can

Regedit deleting the registry can also

C#window Service creation and deletion

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.