Solved

NT service - description field?

Posted on 2000-03-08
6
345 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 

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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

738 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