Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 365
  • Last Modified:

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
0
dmetzler
Asked:
dmetzler
1 Solution
 
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
 
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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

 
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
 
jhanceCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now