Setting the description for a Windows service

  • Thread starter Thread starter Mark Rae
  • Start date Start date
M

Mark Rae

Hi,

Apologies for asking this again - I know it's been answered before - but I
am creating a Windows service and would like to add a description to display
in the Services MMC snap-in.

I know it's possible to do this by writing directly to the Registry:
http://www.codeproject.com/dotnet/dotnetscmdescription.asp

but I seem to recall that soomeone posted a another / better way of doing
this a few months ago...

Any assistance gratefully received.

Mark
 
hi,

AFAIK the best way is go directly to the registry, the other option may be
using WMI, though I have never try it.

Does anybody knows if this will be corrected in version 2?

cheers,
 
And using the command line utility sc.exe is yet another.

Not portable - I don't think that is installed by default on Win2k?? At
least it isn't on my Win2k machine (it is on WinXP.) Of course you could
probably include it as part of your setup distribution...
 
mdb said:
Not portable - I don't think that is installed by default on Win2k?? At
least it isn't on my Win2k machine (it is on WinXP.) Of course you could
probably include it as part of your setup distribution...

That's why I said another option. Anyway it's included with XP and higher
and it's part of the resource kits for NT4 and W2K, it's part of the
platform sdk, and available as a free download from microsoft and it's
freely distributable.

Willy.
 
Back
Top