py2exe and dynamic service installation ?

Thomas Heller theller at python.net
Mon Jun 23 09:33:26 EDT 2003


"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 ?
>

I don't think that's possible. The exe-file uses a C coded main program
which reads _svc_name_ and _svc_display_name_ from string resources
embedded in the exe-file. These are built by py2exe.

Thomas




More information about the Python-list mailing list