How to use python to register a service (an existing .exe file)

Chris Withers chris at simplistix.co.uk
Mon Mar 1 04:38:13 EST 2010


Aahz wrote:
> In article <4b79e28c$0$4610$426a74cc at news.free.fr>,
> News123  <news123 at free.fr> wrote:
> 
>> Is there a python way to register new windows services.
>>
>> I am aware of the
>> instsrv.exe program, which can be used to install services.
>> I could use subprocess.Popen to call
>>
>> instsrv.exe "service_name" program.exe
>>
>> but wondered, whether there's already an existing function.
> 
> Use the win32 package.

Indeed, there's some intersting code in this area here:

http://svn.zope.org/Zope/trunk/src/nt_svcutils/service.py?rev=104819&view=auto

http://svn.zope.org/Zope/trunk/src/Zope2/Startup/zopectl.py?rev=105396&view=auto

...particularly in the do_install function in the latter...

Chris


-- 
Simplistix - Content Management, Batch Processing & Python Consulting
             - http://www.simplistix.co.uk




More information about the Python-list mailing list