[python-win32] mapping from a service to its class file?
Bill Janssen
janssen at parc.com
Fri May 7 23:35:12 CEST 2010
I'm enumerating some service running under XP with
mgr = win32service.OpenSCManager(None, None, 4)
try:
svcinfo = win32service.EnumServicesStatus(mgr)
for svc in svcinfo:
svch = win32service.OpenService(mgr, svc[0], win32service.SERVICE_QUERY_CONFIG)
try:
config = win32service.QueryServiceConfig(svch)
if config[3].endswith('PythonService.exe"'):
# pythonic
print config
finally:
win32service.CloseServiceHandle(svch)
finally:
win32service.CloseServiceHandle(mgr)
For the ones that are using PythonService.exe, I'd like to check to see
whether the Python module for the service is still present. Is there
any way to retrieve the information about that from the service?
Bill
More information about the python-win32
mailing list