rbt wrote:
Roger Upole wrote:
ChangeServiceConfig2 is the api functions that sets the description,
but it's not in the win32service module (yet).
Roger
OK, I can use _winreg to add the 'Description' field under the
appropriate registry key.
Here's an example of it... kludgey but it works ;)
from _winreg import *
import time
def Svc_Description():
try:
key_location = r"SYSTEM\CurrentControlSet\Services\test_py_service"
svc_key = OpenKey(HKEY_LOCAL_MACHINE, key_location, 0, KEY_ALL_ACCESS)
SetValueEx(svc_key,'Description',0,REG_SZ,u"Brad's Test Python Service")
CloseKey(svc_key)
except Exception, e:
print e
Svc_Description()
time.sleep(10)
--
http://mail.python.org/mailman/listinfo/python-list