We have a .Net service that we need to run more than once on the same machine. I have my exe and support files residing in 2 different folders: c:\folder1\ and c:\folder2\
But when I issue either of the following, the ServiceName does not change to what I want it to be:
"c:\folder1 - someId\install\InstallUtil.exe" /servicename="My Service Name 1" "C:\folder1 - someId\MyNameSpace.MyAppName.Service.exe"
sc create "My Service Name 1" binpath="C:\folder1 - someId\MyNameSpace.MyAppName.Service.exe" DisplayName= "My Service Name 1"
If no service has been created, the InstallUtil will register my service but not with the serviceName that I specify.
If a service is registered (for example folder1 service), then the InstallUtil will error on the folder2 registering with a "specified service already exists".
The sc command only shows the help info for the sc command as if I have the wrong syntax.
What is the proper way to register the same service multiple times on the same machine?