Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the best way to set a windows service description in .net

Tags:

I have created a C# service using the VS2005 template. It works fine however the description of the service is blank in the Windows Services control applet.

like image 632
Kevin Gale Avatar asked Jan 27 '09 21:01

Kevin Gale


People also ask

How do I change Windows Service description?

Service descriptions are kept in the registry under LocalMachine\System\CurrentControlSet\services and then open the key for your service name, one of the keys is Description which holds the description text. Change that and restart the computer.


1 Answers

Create a ServiceInstaller and set the description

private System.ServiceProcess.ServiceInstaller serviceInstaller =    new System.ServiceProcess.ServiceInstaller(); this.serviceInstaller.Description = "Handles Service Stuff"; 
like image 193
Nick Avatar answered Sep 20 '22 08:09

Nick