Re: py2exe and dynamic service installation ?

Discussion in 'Python' started by Thomas Heller, Jun 24, 2003.

  1. writes:

    > The attached diff to py2exe v.0.3.4 run_svc.c adds the following optional
    > command line args to the users exe file:
    >
    > -service <desired name>
    > -display <display name>
    > -depends <pipe|separated|dependencies>
    > -user <account name>
    > -pass <password>
    > -auto no param, sets service to autostart
    >
    > Rebuild the py2exe interpreters by running 'python setup.py build' in
    > the py2exe directory.
    >
    > This is only lightly tested and not yet used in production.
    >
    > I also have a run_svc_w.c which provides a consoleless analog to
    > run_w.c (usefull for avoiding 'flashing window syndrome' when bundling
    > exe's for use within an installer such as NSIS or Inno Setup).


    If you want this to be included in the next px2exe release,
    please upload it as a patch to the SF tracker:
    http://sourceforge.net/tracker/?group_id=15583&atid=315583

    Myself I use Wise, which can register the service itself, so I had no
    need for this. Is a separate console version and console-less version
    needed? For debugging?

    Besides, I would think that eventually the best approach would be to
    rewrite PythonService.cpp (which is used by run_svc.c) in pure python
    with ctypes, but currently I have neither a need nor time for this.

    Thomas
    Thomas Heller, Jun 24, 2003
    #1
    1. Advertising

  2. > If you want this to be included in the next px2exe release,
    > please upload it as a patch to the SF tracker:
    > http://sourceforge.net/tracker/?group_id=15583&atid=315583
    >


    At the moment I'm not able to run the patch on my sytem, since the
    executable
    which Mark has sent me has got some references to Python21.dll (I run 2.2).
    But it is a good approach wich makes a flexible tool even more flexible :)

    It would be nice, if Mark could contribute this to the project. I'm not that
    deep in C to modify the files myself ...

    > Myself I use Wise, which can register the service itself, so I had no
    > need for this. Is a separate console version and console-less version
    > needed? For debugging?


    Console-less only would be OK.

    > Besides, I would think that eventually the best approach would be to
    > rewrite PythonService.cpp (which is used by run_svc.c) in pure python
    > with ctypes, but currently I have neither a need nor time for this.


    I absolutely understand this!
    But if you are hit someday by the urgent need to write 1.000 lines in Python
    (like I do sometimes), it would be nice to see this feature ;-)

    >
    > Thomas


    -- Harald
    Harald Schneider, Jun 24, 2003
    #2
    1. Advertising

  3. Thomas,

    do I need to prepare my Python app for the use with WISE, when I want to
    install it as a service? Does it need to provide a certain service API or
    some special response codes ?

    --Harald


    "Thomas Heller" <> schrieb im Newsbeitrag
    news:...
    > writes:
    >
    > > The attached diff to py2exe v.0.3.4 run_svc.c adds the following

    optional
    > > command line args to the users exe file:
    > >
    > > -service <desired name>
    > > -display <display name>
    > > -depends <pipe|separated|dependencies>
    > > -user <account name>
    > > -pass <password>
    > > -auto no param, sets service to autostart
    > >
    > > Rebuild the py2exe interpreters by running 'python setup.py build' in
    > > the py2exe directory.
    > >
    > > This is only lightly tested and not yet used in production.
    > >
    > > I also have a run_svc_w.c which provides a consoleless analog to
    > > run_w.c (usefull for avoiding 'flashing window syndrome' when bundling
    > > exe's for use within an installer such as NSIS or Inno Setup).

    >
    > If you want this to be included in the next px2exe release,
    > please upload it as a patch to the SF tracker:
    > http://sourceforge.net/tracker/?group_id=15583&atid=315583
    >
    > Myself I use Wise, which can register the service itself, so I had no
    > need for this. Is a separate console version and console-less version
    > needed? For debugging?
    >
    > Besides, I would think that eventually the best approach would be to
    > rewrite PythonService.cpp (which is used by run_svc.c) in pure python
    > with ctypes, but currently I have neither a need nor time for this.
    >
    > Thomas
    Harald Schneider, Jun 24, 2003
    #3
  4. "Harald Schneider" <> writes:

    > Thomas,
    >
    > do I need to prepare my Python app for the use with WISE, when I want to
    > install it as a service? Does it need to provide a certain service API or
    > some special response codes ?


    No, you create your service with py2exe as always, and Wise does the
    rest - create a windows installer, install the files on the target
    machine and register the serice there. The registration is done from the
    installer, not from the service.

    I'll try to attach a screenshot of the dialogbox that the wise program
    displays (at build time), so you can see the options which are
    available.
    Hm, doesn't work in the newsgroup - will send by private mail.

    Thomas
    Thomas Heller, Jun 24, 2003
    #4
  5. SOLVED: py2exe and dynamic service installation ?

    OK -- I catched the point :)
    I generated the service exe like usual and used XNET.EXE (part of the free
    KIX package, see www.kixstart.org ) to install the service under any name.
    Thanks!

    --Harald


    "Thomas Heller" <> schrieb im Newsbeitrag
    news:...
    > "Harald Schneider" <> writes:
    >
    > > Thomas,
    > >
    > > do I need to prepare my Python app for the use with WISE, when I want to
    > > install it as a service? Does it need to provide a certain service API

    or
    > > some special response codes ?

    >
    > No, you create your service with py2exe as always, and Wise does the
    > rest - create a windows installer, install the files on the target
    > machine and register the serice there. The registration is done from the
    > installer, not from the service.
    >
    > I'll try to attach a screenshot of the dialogbox that the wise program
    > displays (at build time), so you can see the options which are
    > available.
    > Hm, doesn't work in the newsgroup - will send by private mail.
    >
    > Thomas
    Harald Schneider, Jun 24, 2003
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Harald Schneider

    Re: py2exe and dynamic service installation ?

    Harald Schneider, Jun 24, 2003, in forum: Python
    Replies:
    0
    Views:
    1,151
    Harald Schneider
    Jun 24, 2003
  2. Brad Clements
    Replies:
    0
    Views:
    641
    Brad Clements
    Aug 19, 2003
  3. Brad Clements
    Replies:
    3
    Views:
    7,333
    Brad Clements
    Aug 24, 2003
  4. F. GEIGER
    Replies:
    0
    Views:
    912
    F. GEIGER
    Aug 16, 2004
  5. python
    Replies:
    3
    Views:
    1,779
    Simon Brunning
    May 22, 2006
Loading...

Share This Page