10-03-2019, 02:58 AM
As per the subject line, really. Is it possible to run multiple services via the same executable? We see some hard dependencies between the application name and the service name that makes this difficult.
At the moment we have have an app that binds to a port on the command line, e.g. AppName.exe -port=1234.
This can be installed as a service via the /install flag or using sc.exe happily as long as the service name matches AppName.
If I want to run multiple versions, they don't work as the service name doesn't match.
E.g.
Works on service start/stop: sc create AppName binPath= "c:\path\AppName.exe -port=1234"
Hangs on service start: sc create AppName2 binPath= "c:\path\AppName.exe -port=3456"
Any suggestions or ways to achieve this?
At the moment we have have an app that binds to a port on the command line, e.g. AppName.exe -port=1234.
This can be installed as a service via the /install flag or using sc.exe happily as long as the service name matches AppName.
If I want to run multiple versions, they don't work as the service name doesn't match.
E.g.
Works on service start/stop: sc create AppName binPath= "c:\path\AppName.exe -port=1234"
Hangs on service start: sc create AppName2 binPath= "c:\path\AppName.exe -port=3456"
Any suggestions or ways to achieve this?