py2exe and dynamic service installation ?

Harald Schneider h_schneider at marketmix.com
Tue Jun 24 05:03:13 EDT 2003


Would be nice to see this feature in the nex py2exe release ...

--Harald


<mmillikan at vfa.com> schrieb im Newsbeitrag news:3ci0syqd.fsf at vfa.com...
> "Harald Schneider" <h_schneider at marketmix.com> writes:
>
> > Hi,
> >
> > I used py2exe to create a NT service, which works flawlessly. Now the
same
> > application needs to be installed multiple times on the same machine.
For
> > this I need to pass _svc_name_ and _svc_display_name_ at runtime as
command
> > line parameters after -install.
> >
> > But no matter what I do, if I compile the application with py2exe it
falls
> > back to the first assignment of _svc_name_ in the class header - it just
> > ignores the passed command line paramters and also any assignment to
> > _svc_name_ etc in the class header or the __init part ...
> >
> > Is there a way to assign these varibales dynamically before the service
is
> > created ?
> >
> > All the best,
> > Harald
>
> 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
>
>






More information about the Python-list mailing list