I have an exe file with a windows service. To install it, i use the command:
installutil myService.exe /ShowCallStack
Then, i can see the "service1" listed in Services window.
My question is if it is possible to install 2 instances of same service (using the same exe) but with diferent names. I want to do that without changing the source code.
Thanks
You need to copy your service executable to a separate directory and use InstallUtil.exe to give it a different service name. From a command prompt, you'll need to use InstallUtil to install both instances of your service. For instructions on how to use InstallUtil, see Installer Tool (InstallUtil.exe).
Does your service have a ProjectInstaller
class? If you add a ProjectInstaller
to your service, then you can edit the DisplayName
property of the ProjectInstaller's ServiceInstaller. This will change the name from "Service1" to whatever you want it to be. A walkthrough on ProjectInstallers can be found on MSDN here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With