NT service - description field?

I have an application which is an NT service.  Everything seems to be working okay, except that in the Service Properies in NT my description field is blank.  Where can I populate this from my program when it installs itself as a service?

Thanks,

Don
dmetzlerAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
jhanceConnect With a Mentor Commented:
You must add this information manually to the registry using RegSetValueEx() as CreateService doesn't provide a way to add this to the service database using the SCM API.

To quote the SDK CreateService:

Remarks
The CreateService function creates a service object and installs it in the service control manager database by creating a key with the same name as the service under the following registry key:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services

Information specified for this function is saved as values under this key. Setup programs and the service itself can create subkeys under this key for any service specific information.
0
 
jkrCommented:
Sorry, but what do you mean with 'Service Properties'?
0
 
dmetzlerAuthor Commented:
When I go into the Component Services (Win2000 Pro) and bring up the properties for my service, the description field in blank.  Most of the other services have this field filled in.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
bbousquetCommented:
If I properly recall from what we're doing with our device driver, this is stored in one of the registry keys (I might be mistaken though - it's been awhile...).
0
 
dmetzlerAuthor Commented:

>>
If I properly recall from what we're doing with our device driver, this is stored in one of the registry keys (I might be mistaken though - it's been awhile...).
>>

So it's not a parameter on CreateService() or something?  Sounds like I have to create the service and then edit the registry key?

Don
0
 
bbousquetCommented:
It might be. I was just guessing here.

But you're right, it is a parameter on the CreateService API function.
0
All Courses

From novice to tech pro — start learning today.