473,770 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

NT service (setting Description string)

Anybody know what variable I need to define in my
class to set the long description that shows up
in the Services control panel applet?

_svc_name_ holds the short name
_svc_display_na me_ holds the long name
_svc_?????_ holds the description

Thanks, Larry
Jul 18 '05 #1
2 1828
"Larry Bates" <lb****@swamiso ft.com> writes:
Anybody know what variable I need to define in my
class to set the long description that shows up
in the Services control panel applet?

_svc_name_ holds the short name
_svc_display_na me_ holds the long name
_svc_?????_ holds the description


There isn't any yet. Apparently you have to call the win32 api
ChangeServiceCo nfig2() (but maybe it can also be done with the wmi
module).

Thomas
Jul 18 '05 #2
I found a way to do this that seems to make
sense. You can modify the Description in
the registry using _winreg. The value
is located at:

HMLM\SYSTEM\Cur rentControlSet\ Services\<servi cename>

I then installed the code below in the main
program of the service (that gets executed
when the service is installed). This way
the registry gets "fixed" every time the
service is installed or removed. Seems to
work pretty well.

Thanks for the input from everyone.

Larry Bates
if __name__ == "__main__":
import sys
import _winreg
#
# Following line handles install/remove/start/stop commands from the
command line
#
win32serviceuti l.HandleCommand Line(AFRservice )
try: cmd=sys.argv[1].upper()
except: sys.exit()

if cmd == 'INSTALL':
print "Calling win32evtlogutil .AddSourceToReg istry for AFR
Application"

win32evtlogutil .AddSourceToReg istry('AFR','C: \Python22\Lib\s ite-Packages\win
32\servicemanag er.pyd',
'Application')

#
# Update the description of this service in the registry
#

#---------------------------------------------------------------------
# Open registry at the proper key

#---------------------------------------------------------------------
regkey='SYSTEM\ CurrentControlS et\Services\AFR '
key=_winreg.Ope nKey(_winreg.HK EY_LOCAL_MACHIN E, regkey, 0,
_winreg.KEY_SET _VALUE)
description='AF R provides automated routing for inbound faxes that
are ' \
'received by Castelle Faxpress fax server. Faxes are
converted ' \
'to .PDF files and routed via SMTP email to users based
on ' \
'routing rules.'

_winreg.SetValu eEx(key, 'Description', 0, _winreg.REG_SZ,
description)

elif cmd == 'REMOVE':
print "Calling win32evtlogutil .RemoveSourceFr omRegistry for AFR
Application"
win32evtlogutil .RemoveSourceFr omRegistry('AFR ','Application' )

"Larry Bates" <lb****@swamiso ft.com> wrote in message
news:jJ******** ************@co mcast.com...
Anybody know what variable I need to define in my
class to set the long description that shows up
in the Services control panel applet?

_svc_name_ holds the short name
_svc_display_na me_ holds the long name
_svc_?????_ holds the description

Thanks, Larry

Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1891
by: David Norris | last post by:
I have created a simply Windows Service which installs, starts, stops, etc just fine. I'm confused by the fact that even though the service shows up in the Computer Management Services list there is no Description and I am unable to identify a property in the ServiceBase or any other class for that matter in my Windows Service Project that bothers to make mention of how to go about setting the Description. Does anyone know how to do go...
2
15452
by: Paul Hale | last post by:
I have a vb.net web service and client that are both working fine. If someone wanted to consume our web service using .NET, no problem. Im a little confused on how non .NET clients would use the web service though. Question 1: Does Java etc have some kind of SOAP tool kit developers could use to access our web service? Question 2: .NET conveniently shows what the serialized xml looks like and what the web service expects (Please see...
2
1769
by: Greg | last post by:
Please note: I have cross posted this from Newsgroup: microsoft.public.dotnet.framework.aspnet.webservices with a few minor changes... I am having a simple problem setting up the security on my test web service... My Web service code is: Imports System.Web.Services
3
7679
by: Jim Lewis | last post by:
I have read several things that state accessing a Web Service through a Query String should work. However, when I try to execute http://localhost/webservice1/service1.asmx/HelloWorld I get the error below. Can I access a Web Service through a Query Sting. I need to send XML to a Flash movie using a Web Service. Thank You, Jim Lewis Server Error in '/WebService1' Application.
2
4682
by: letibal | last post by:
Hello, I have written a windows service and created an installer for it. The service runs under the system accounts. When started, it launches a GUI. By default, the InteractiveProcess property of the service is not set (this can be checked by right-clicking on the service in the Services window (Admin tools>Services), choosing Properties, LogOn tab). In order to enable my service to launch a GUI at startup, I added the following lines...
3
6625
dmjpro
by: dmjpro | last post by:
plz send me a good link which can clearify me how the J2EE framework works i want the details information .... plz help thanx
5
3307
by: dm3281 | last post by:
I'm really starting to hate writing services -- or trying to, anyway. Why do I need to rename my project to the service name? Why do I need to set the "ServiceName" property to my service name? Why do I need to set a property within my code to the service name? Are all these required or am I just doing this for consistency purposes?
2
2930
by: | last post by:
Hi all, I have an asp.net 2.0 website that accesses a locally hosted web service. This works fine on servers that are connected to our network. However, I am having a problem with a laptop server that I have built. The code that tries to connect to the web service breaks if the laptop is not within our network. Further debugging has revealed that this is due to a proxy server issue. Our domain sets the proxy server via GPO for all...
3
2491
by: Anil S | last post by:
Hello, my application is console application and I have created "Service Reference" of the webservices. this webservice uses username and password. my code are following: myArray nl; FeedSoapClient client = new FeedSoapClient(); client.ClientCredentials.UserName.UserName = "tellme"; client.ClientCredentials.UserName.Password = "tellme";
0
9617
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10254
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10036
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9904
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8929
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6710
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5481
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2849
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.