When I try to install a Windows service:
c:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\installutil
I get, what looks to be, some success messages and som
It turns out that the install might, or probably will, fail if that service is highlighted in the Services applet. It's safest to just close the Services applet, install the service, and then re-open the Services applet. It's really stupid.
Also, make sure to run the console as admin.
Adding few more check's and points to solve this above issue.
Still if issue exists then Another Checkpoint & SOLUTION When a service starts, the service communicates to the Service Control Manager how long the service must have to start (the time-out period for the service). If the Service Control Manager does not receive a "service started" notice from the service within this time-out period, the Service Control Manager terminates the process that hosts the service. This time-out period is typically less than 30 seconds. If you do not adjust this time-out period, the Service Control Manager ends the process. To adjust this time-out period, follow these steps: 1.Go to Start > Run > and type regedit 2.Navigate to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control With the control folder selected, right click in the pane on the right and select new DWORD Value 3.Name the new DWORD: ServicesPipeTimeout 4.Right-click ServicesPipeTimeout, and then click Modify Click Decimal, type '180000', and then click OK 5.Restart the computer
Still if issue exists then problem in your service code ,infinate loop may occur due to your methods/classes of service calling. Do code review of each line.
Right Click on Command Prompt and choose RUN AS ADMINISTRATOR
Then copy and paste in: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe C:\TestService\bin\Debug\TestService.exe
Result in TestService.InstallLog is:
Installing service TestService...
Service TestService has been successfully installed.
This problem is due to security, you'd better open developer command prompt for VS 2012:
RUN AS ADMINISTRATOR
and install your service. It will surely fix your problem.
I tried and the issue was resolved.
I experienced the same and the issue for me was that a service with the same name was already installed. So in order to install the new service I had to uninstall the older services. I am learning how to create and setup windows services and thus the naming conflicting. Tried uninstalling the service first through:
c:\Windows\Microsoft.NET\Framework64\v4.0.30319\installutil -u servicename.exe
Once this statement executes successfully, install your service and it should succeed without any rollbacks.
Some times this happens due to permission issues. Run the "Developer Command Prompt for VS 2012" as Administrator. Then it will work.