PyInstaller and windows services

163 views
Skip to first unread message

Massi

unread,
Sep 12, 2011, 11:06:11 AM9/12/11
to PyInstaller
Hi everyone,

I'm writing a script in which I create a windows service and now I'm
trying to find the best solution to freeze it in an executable; since
I have already successfully used PyInstaller to build my own GUI
applications, I'm guessing if it also provides the support for windows
services. If so, can anyone point me out an example or some
documentation which explains how to do it?

Thanks in advance!

Martin Zibricky

unread,
Sep 12, 2011, 11:19:59 AM9/12/11
to pyins...@googlegroups.com
Massi píše v Po 12. 09. 2011 v 08:06 -0700:

> I have already successfully used PyInstaller to build my own GUI
> applications,

Wouldn't you mind mention those applications on
http://www.pyinstaller.org/wiki/ProjectsUsingPyInstaller
?

> I'm guessing if it also provides the support for windows
> services. If so, can anyone point me out an example or some
> documentation which explains how to do it?

I think you should look at the pywin32 extension and the COM technology.
http://en.wikipedia.org/wiki/Component_Object_Model

I also found the following snippet:

http://code.activestate.com/recipes/576451-how-to-create-a-windows-service-in-python/

Don Dwiggins

unread,
Sep 12, 2011, 12:34:44 PM9/12/11
to pyins...@googlegroups.com
On 9/12/2011 8:19 AM, Martin Zibricky wrote:
>
>> I'm guessing if it also provides the support for windows
>> services. If so, can anyone point me out an example or some
>> documentation which explains how to do it?
> I think you should look at the pywin32 extension and the COM technology.
> http://en.wikipedia.org/wiki/Component_Object_Model

A service is a very different animal than a COM object.

I've successfully used py2exe to freeze Windows services -- it provides
explicit support via the "service" parameter to setup. As a result, I
haven't invested the time to figure out what it would take (if anything)
to make PyInstaller support them (I prefer to use PyInstaller for
"regular" exes, and would switch to it for services if I knew it would
handle them).

For anyone who's motivated, I'd suggest starting out by looking at the
py2exe code that handles "service".

--

Don Dwiggins
Advanced Publishing Technology


Reply all
Reply to author
Forward
0 new messages