Window
Recently, a Windows service (Windows services) has been written, and after installation, it feels different from existing Windows services. Why? My lack of description, the middle column is empty.
Look again. NET ServiceBase class does not add a description of the attribute.
There are no attributes to add to the public class ProjectInstaller:System.Configuration.Install.Installer. After searching from the net to know to overload ProjectInstaller install and Uninstall virtual method. In fact, the purpose of rewriting these virtual methods is to add a key value "Description" to the corresponding service in the registry, and the value should be filled with the corresponding description.
public override void Install (IDictionary stateserver)
{
Microsoft.Win32.RegistryKey system,
Service
Config
Try
{
Let the project installer does its job
Base. Install (StateServer);
System = Microsoft.Win32.Registry.LocalMachine.OpenSubKey ("System"). OpenSubKey ("CurrentControlSet"). OpenSubKey ("Services");
Service = System. OpenSubKey (This.serviceInstaller1.ServiceName, true);
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.