#1 commandline args for services

closed-out-of-date
Thomas Heller
None
5
2004-02-20
2003-06-24
Anonymous
No

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).

Feedback welcome.

Mark Millikan
mmillikan@vfa.com

Discussion

  • not to sure about diff format

     
    Attachments
  • Mark Millikan
    Mark Millikan
    2003-07-30

    Logged In: YES
    user_id=824020

    Does this require further explanation/justification?

    I've been using it for a month to build and package a
    distributed report generator. It includes a single windows
    service binary that is registered six times per host
    machine. This requires that the service name and the display
    name be unique for each of the registrations. The user,
    password, dependencies and auto parameters are varied
    depending on whether the installation is a primary (is
    coresident with the name server service) or secondary
    server. The installer is NSIS. Depending on options set by
    the user during the install the installer invokes the
    service binary multiple times with the appropriate
    parameters. Building the binary using the run_svc_w.exe
    allows this to happen quickly and transparently (no windows
    flashing by.

    The service binaries have been built > 100 times (by py2exe).

     
  • Thomas Heller
    Thomas Heller
    2003-07-31

    • assigned_to: nobody --> theller
     
  • Thomas Heller
    Thomas Heller
    2003-07-31

    Logged In: YES
    user_id=11105

    Mark, thanks for the patch and apalogies for me not looking
    at it. I will do this ASAP, hopefully next week.

     
  • Mark Millikan
    Mark Millikan
    2003-08-01

    Logged In: YES
    user_id=824020

    FYI:

    I've primarily built the patched executables using python
    2.2.3 (with no problems). I made some attempts against a cvs
    checkout of 2.3.something and it <almost> worked. I think
    the problems were due to setup and or version issues between
    VC6, the sdk, win32all, and the cvs 2.3. Since, the code I
    was developing was going to use 2.2.3, because of extension
    availability, I didn't pursue it and risk breaking my 2.2.3
    environment. I haven't looked at py2exe 4.1 yet.

     
  • Thomas Heller
    Thomas Heller
    2004-02-20

    • status: open --> closed
     
  • Thomas Heller
    Thomas Heller
    2004-02-20

    Logged In: YES
    user_id=11105

    I'm closing this as out of date. I hope you are happy with
    the possibilities in py2exe 0.5 - we also discussed this
    offline with Mark Hammond.

     
  • Thomas Heller
    Thomas Heller
    2004-02-20

    • status: closed --> closed-out-of-date