A
Andy Fish
Hi,
I am building a windows service using c#, using the ServiceInstaller and
ServiceProcessInstaller classes to install.
I would like to be able to have 2 separate installations of this service on
the machine (i.e. 2 copies of the same executable, 2 sets of registry
entries etc) so obviously one of them will need to have a different name.
I'm happy to do a bit of manual registry tweaking after installing the first
one, but I don't want to have to build 2 binaries with different service
names
I notice that both the ServiceBase and the ServiceInstaller set the
ServiceName to a hard-coded value. Is it possible to change the value at
runtime and how does this work with respect to registry entries etc?
TIA
Andy
I am building a windows service using c#, using the ServiceInstaller and
ServiceProcessInstaller classes to install.
I would like to be able to have 2 separate installations of this service on
the machine (i.e. 2 copies of the same executable, 2 sets of registry
entries etc) so obviously one of them will need to have a different name.
I'm happy to do a bit of manual registry tweaking after installing the first
one, but I don't want to have to build 2 binaries with different service
names
I notice that both the ServiceBase and the ServiceInstaller set the
ServiceName to a hard-coded value. Is it possible to change the value at
runtime and how does this work with respect to registry entries etc?
TIA
Andy