From: News123 on
Hi,

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.

Thans in advance and bye


N
From: Aahz on
In article <4b79e28c$0$4610$426a74cc(a)news.free.fr>,
News123 <news123(a)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.
--
Aahz (aahz(a)pythoncraft.com) <*> http://www.pythoncraft.com/

"At Resolver we've found it useful to short-circuit any doubt and just
refer to comments in code as 'lies'. :-)"
From: Chris Withers on
Aahz wrote:
> In article <4b79e28c$0$4610$426a74cc(a)news.free.fr>,
> News123 <news123(a)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

From: Eman on
On Feb 15, 4:10 pm, News123 <news...(a)free.fr> wrote:
> Hi,
>
> 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.
>
> Thans in advance and bye
>
> N


Try my favorite 3rd pary tools maker, Chilkatsoft.com.
http://www.chilkatsoft.com/refdoc/pythonCkServiceRef.html

Eman_No1
From: coldpizza on
instsrv.exe does not come with Windows by default, but I guess it
should be possible to add a service using the win32 built-in `sc`
command line tool.

Try `sc create` from a console.

The app you want to install as a service will still have to be
compliant with the win32 service interface, otherwise it will throw an
error, although the app will still be started.

On Feb 16, 2:10 am, News123 <news...(a)free.fr> wrote:
> Hi,
>
> 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.
>
> Thans in advance and bye
>
> N