I have an odd situation that I am not sure how to resolve.
I have an executable, let's say cat.exe located at C:\Program Files\MyPath\cat.exe
Trying to use sc create
failed each time, I was not sure why this was happening, and after reading online I found that InstallUtil.exe
was a better solution.
So I used that, and from command prompt:
C:\Windows\Microsoft.Net\Framework\v 2.0.50727\InstallUtil.exe "C:\Program Files\MyPath\cat.exe"
This installed the service correctly. I then went into services, and changed the start mode to Automatic, and then started the service. A few minutes later, the service crashed. After the crash the service would never start again, each time it hit a timeout limit. The application is in 3.5 so thoughts were to remove the service and then install using v4 installutil.
I then tried to remove the service, using: C:\Windows\Microsoft.Net\Framework\v 2.0.50727\InstallUtil.exe /u "C:\Program Files\MyPath\cat.exe"
This did not remove the service. The only way I was able to remove the service was to do: sc delete "CAT"
This removed the service fine, but now no matter what I do, all attempts to re-add using InstallUtil fail, regardless of which framework directory I try from. Also, I cannot add new services such as
C:\Windows\Microsoft.Net\Framework\v 2.0.50727\InstallUtil.exe "C:\Program Files\MyPath\dog.exe"
or in v4 C:\Windows\Microsoft.Net\Framework\v 4.3.30319\InstallUtil.exe "C:\Program Files\MyPath\dog.exe"
I get no errors indicating that errors have occurred creating the service. Any ideas on why this is failing or what I can do to attempt to remedy the situation ?