I'm not sure which scenario you have in mind. You want to change the name of your Windows service. Fair. When will this change?
Imagine that you have found a solution and created such a Windows service. I assume that in your scenario you should install it at least for the first time. Then you do not want to uninstall / install it. But presumably you would like to start / stop and do other things with it. Will one of these actions change the name of the service?
If so, I think you can start a process that uninstalls and installs it with a different name for you transparently, based on some kind of naming logic.
I donβt understand how to do this.
Or just come up with a really common name to cover all the possibilities (which can be incredibly simple or incredibly difficult).
Umar Farooq Khawaja
source share