Click here to Skip to main content
15,921,212 members
Home / Discussions / C#
   

C#

 
GeneralRe: Windows Service name/description Pin
Heath Stewart21-Oct-04 6:57
protectorHeath Stewart21-Oct-04 6:57 
Since the ServiceInstaller doesn't define such a property, you have to write it to the registry yourself. The easiest way is, in your Installer derivative (the class that references the ServiceInstaller and ServiceProcessInstaller), override Install (and Uninstall with code to remove the key) like so:
public override void Install(IDictionary stateSaver)
{
  base.Install(stateSaver);
  using (RegistryKey key = Registry.LocalMachine.OpenSubkey(
    @"SYSTEM\CurrentControlSet\Services\" + serviceInstaller1.ServiceName))
  {
    if (key != null)
      key.SetValue("Description", description);
  }
}
string description;
public string Description
{
  get { return description; }
  set { description = value; }
}
You wouldn't have to define it as a property, but it makes for a good design.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: Windows Service name/description Pin
petst21-Oct-04 9:18
petst21-Oct-04 9:18 
GeneralwParam, lParam Help Pin
Keith La Force21-Oct-04 6:23
Keith La Force21-Oct-04 6:23 
GeneralRe: wParam, lParam Help Pin
Heath Stewart21-Oct-04 6:50
protectorHeath Stewart21-Oct-04 6:50 
GeneralDrag-and-drop Panel control Pin
zsiga21-Oct-04 6:02
zsiga21-Oct-04 6:02 
GeneralRe: Drag-and-drop Panel control Pin
Heath Stewart21-Oct-04 7:07
protectorHeath Stewart21-Oct-04 7:07 
GeneralRe: Drag-and-drop Panel control Pin
zsiga22-Oct-04 3:33
zsiga22-Oct-04 3:33 
GeneralRe: Drag-and-drop Panel control Pin
Heath Stewart22-Oct-04 8:30
protectorHeath Stewart22-Oct-04 8:30 
GeneralRe: Drag-and-drop Panel control Pin
zsiga23-Oct-04 2:51
zsiga23-Oct-04 2:51 
GeneralRe: Drag-and-drop Panel control Pin
Heath Stewart23-Oct-04 5:32
protectorHeath Stewart23-Oct-04 5:32 
GeneralRe: Drag-and-drop Panel control Pin
zsiga24-Oct-04 0:43
zsiga24-Oct-04 0:43 
GeneralRe: Drag-and-drop Panel control Pin
Heath Stewart24-Oct-04 4:40
protectorHeath Stewart24-Oct-04 4:40 
GeneralOutlook-style mini calendar Pin
machocr21-Oct-04 4:57
machocr21-Oct-04 4:57 
GeneralRe: Outlook-style mini calendar Pin
Heath Stewart21-Oct-04 7:07
protectorHeath Stewart21-Oct-04 7:07 
GeneralRe: Outlook-style mini calendar Pin
machocr21-Oct-04 7:15
machocr21-Oct-04 7:15 
GeneralRe: Outlook-style mini calendar Pin
Heath Stewart21-Oct-04 7:44
protectorHeath Stewart21-Oct-04 7:44 
GeneralRe: Outlook-style mini calendar Pin
machocr21-Oct-04 9:40
machocr21-Oct-04 9:40 
GeneralRe: Outlook-style mini calendar Pin
Jordi Corominas7-Nov-04 21:47
Jordi Corominas7-Nov-04 21:47 
Generalrun .net app in all systems Pin
visitsaadi21-Oct-04 4:50
visitsaadi21-Oct-04 4:50 
GeneralRe: run .net app in all systems Pin
J4amieC21-Oct-04 4:59
J4amieC21-Oct-04 4:59 
GeneralRe: run .net app in all systems Pin
McClamm21-Oct-04 5:29
McClamm21-Oct-04 5:29 
GeneralRe: run .net app in all systems Pin
Heath Stewart21-Oct-04 7:14
protectorHeath Stewart21-Oct-04 7:14 
GeneralRe: run .net app in all systems Pin
McClamm21-Oct-04 9:01
McClamm21-Oct-04 9:01 
GeneralRe: run .net app in all systems Pin
Heath Stewart21-Oct-04 13:42
protectorHeath Stewart21-Oct-04 13:42 
Generaldatagrid column sorting Pin
ddelapasse21-Oct-04 4:35
ddelapasse21-Oct-04 4:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.