Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Service Install Ends in Rollback

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 some failure messages. Part way down:

An exception occurred during the Install phase.
System.ComponentModel.Win32Exception: The specified service has been marked for deletion

At the end:

The Rollback phase completed successfully.

The transacted install has completed.
The installation failed, and the rollback has been performed.

The service is given an entry in the Services applet, but it is marked as "Disabled". When I attempt to change it to another state, I get a "marked for deletion" error message.

There are no messages in the Event Log. There is nothing useful in the log file created by installutil.exe (I believe it's written to the current working directory).

I have no direction to go with this. What do I do?

like image 747
Dustin Oprea Avatar asked Aug 28 '13 22:08

Dustin Oprea


2 Answers

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.

like image 127
Dustin Oprea Avatar answered Nov 08 '22 03:11

Dustin Oprea


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.

like image 29
Sarah Avatar answered Nov 08 '22 02:11

Sarah