OK, thanks guys. Can the same thing be done for other service properties, in particular, the recovery actions? How would I do this?
Stephen On Thu, 2 Feb 2006 15:27:53 +0100, Thomas Freudenberg <[EMAIL PROTECTED]> wrote: >Yes, the article goes further than what you've asked for. The >information you requested is: the description for a Windows service >goes to the registry, i.e. the Description value at >HKLM\SYSTEM\CurrentControlSet\Services\<my service> > >Regards, >Thomas > >On 2/2/06, Iain Smallwood <[EMAIL PROTECTED]> wrote: >> If you meant what I think you mean (and you may not of course!) then >> what I do to achieve this is override the Install method of the >> ProjectInstaller class that a service project automatically creates to >> add the relevant registry key e.g.: >> >> Public Overrides Sub Install(ByVal mySavedState As IDictionary) >> >> ' call the original Install() method to create root key >> MyBase.Install(mySavedState) >> >> Dim ServiceDescription As Microsoft.Win32.RegistryKey = Nothing >> >> Try >> >> ServiceDescription = >> Microsoft.Win32.Registry.LocalMachine.OpenSubKey( _ >> "System\CurrentControlSet\Services\MyServiceName", True) >> ServiceDescription.SetValue("Description", _ >> "This service does what it says on the tin.") >> ServiceDescription.Close() >> >> Catch exc As Exception >> 'could I care less about errors here? >> End Try >> >> End Sub 'Install >> >> Cheers, >> Iain >> >> >> Iain Smallwood >> >> www.tmcs.co.uk >> >> 01329 239 900 (General) >> >> 01329 226 900 (Helpdesk) >> >> it for business >> >> >> -----Original Message----- >> From: Discussion of advanced .NET topics. >> [mailto:[EMAIL PROTECTED] On Behalf Of Stephen Bub >> Sent: Thursday, 02 February 2006 11:16 >> To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM >> Subject: [ADVANCED-DOTNET] Service description >> >> Hi there. Can anyone tell me how to add a Windows Service description >> that will be displayed in the Windows Computer Management Console? >> >> =================================== >> This list is hosted by DevelopMentor(r) http://www.develop.com >> >> View archives and manage your subscription(s) at >> http://discuss.develop.com >> >> Disclaimer >> This message may contain information which is legally privileged and/or confidential. If you are not the intended recipient, you are hereby notified that any unauthorised disclosure, copying, distribution or use of this information is strictly prohibited. Such notification not withstanding, any comments or opinions expressed are those of the originator, not of Taylor Made Computer Solutions Ltd., unless otherwise explicitly stated. >> >> >> >> >> =================================== >> This list is hosted by DevelopMentor(r) http://www.develop.com >> >> View archives and manage your subscription(s) at http://discuss.develop.com >> > >=================================== >This list is hosted by DevelopMentorĀ® http://www.develop.com > >View archives and manage your subscription(s) at http://discuss.develop.com OK, thanks guys. Can the same thing be done for other service properties, in particular, the recovery actions? How would I do this? Stephen =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com