Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > How to use python to register a service (an existing .exe file)

Reply
Thread Tools

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

 
 
News123
Guest
Posts: n/a
 
      02-16-2010
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
 
Reply With Quote
 
 
 
 
Aahz
Guest
Posts: n/a
 
      02-20-2010
In article <4b79e28c$0$4610$(E-Mail Removed)>,
News123 <(E-Mail Removed)> 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 ((E-Mail Removed)) <*> 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'. "
 
Reply With Quote
 
 
 
 
Chris Withers
Guest
Posts: n/a
 
      03-01-2010
Aahz wrote:
> In article <4b79e28c$0$4610$(E-Mail Removed)>,
> News123 <(E-Mail Removed)> 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/n...4819&view=auto

http://svn.zope.org/Zope/trunk/src/Z...5396&view=auto

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

Chris


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

 
Reply With Quote
 
Eman
Guest
Posts: n/a
 
      03-02-2010
On Feb 15, 4:10*pm, News123 <(E-Mail Removed)> 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/py...erviceRef.html

Eman_No1
 
Reply With Quote
 
coldpizza
Guest
Posts: n/a
 
      03-02-2010
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 <(E-Mail Removed)> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Python mode: make emacs use existing *Python* frame, and not opena new one Lars Bungum Python 0 06-16-2011 02:57 PM
Existing Dll - using Functions from an existing dll Tristin.Colby@gmail.com Ruby 0 02-05-2008 07:38 PM
Why no existing Java type to existing XML schema binding support? nrm Java 3 04-10-2006 04:52 PM
Minor nit in Py24 installer: Deselecting register extensionsde-registers existing associations Mike C. Fletcher Python 1 09-05-2004 09:24 AM



Advertisments