[python-win32] Changing the name of a service
Rogelio Flores
rogelio.flores at gmail.com
Wed Nov 23 18:30:01 CET 2005
Is there a way to override the name of a service when installing it?
What I want to do is use the same python script to install more than
one copies of the same service, under a different name, on the same
machine. I know I can simply copy the python file and change the
_svc_name_ and have two clones of the service I can install with
different names, but I want something like providing the service name
on the command line when I do the install. I already have a
customOptionHandler function that can take arguments, but I cannot
change the _svc_name_ property since
win32serviceutil.HandleCommandLine(MyService,
argv = sys.argv,
customInstallOptions = 'c:',
customOptionHandler = customOptionHandler)
takes the class name and I guess it gets the name from there so
anything I do in customOptionHandler to the name doesn't get recorded
at install time.
--
Rogelio
More information about the Python-win32
mailing list