We recently faced an issue where we had a few windows services interacting with Dynamics 365 CE instance on prem.
We were using the InstallUtil utility in windows to install the service in all environments and never faced issue with installation, but the service failed to install in Prod.
Here is the InstallUtil command we were using:
The problem was after executing the utility there was no error in console and no error in event logs but we couldn’t see the service in windows services explorer.
Also we checked the count of services before and after running the InstallUti utility and the result was the same
powershell (Get-Service | Measure-Object).Count
We ended up using the SC CREATE command to install the service and it worked just fine for us.
SC CREATE "abc.exe" binpath="C:\xyz\abc.exe" displayname="abc.exe"