acadia
acadia

Reputation: 2621

Installing Windows Service without rebuilding

How can I install same windows service in different Service name as it has to point to a different database on the same machine.

Is there a way I can do without having to rebuild the project and change the name in Service installer?

Thanks in advance

Upvotes: 2

Views: 121

Answers (1)

Samuel Neff
Samuel Neff

Reputation: 74899

The service name is a string. You can pass it as a parameter to the installer and install the same service multiple times using the parameterized service name.

Here's an abstract base class we use for service that includes a code based installer. You can adapt this to parameterized service name easily.

Converting a c# commandline app to a Windows service

Upvotes: 1

Related Questions