Solved

NT service - description field?

Posted on 2000-03-08
6
336 Views
Last Modified: 2013-12-03
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
Comment
Question by:dmetzler
6 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 2598297
Sorry, but what do you mean with 'Service Properties'?
0
 

Author Comment

by:dmetzler
ID: 2598546
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
 
LVL 2

Expert Comment

by:bbousquet
ID: 2598623
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:dmetzler
ID: 2598916

>>
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
 
LVL 2

Expert Comment

by:bbousquet
ID: 2599036
It might be. I was just guessing here.

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

Accepted Solution

by:
jhance earned 100 total points
ID: 2599907
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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now