Background:
Make a project a Windows service, when debugging, you need to uninstall and install the service, but you are prompted with the following error: "The specified service has been marked for deletion," Enter the service management interface, start the service you registered, and cannot manually change to Enabled mode (when the Startup type displays the disabled), and the same prompt The specified service has been marked for deletion.
Workaround:
I closed the Service Management window, and the problem was solved (reboot the machine if necessary). Therefore, the reason for this is that the Service Management window is not closed when you run the Delete Service item command.
Install (I put the C_jk.exe file under the Shyy folder):
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\installutil.exe E:/shyy/c_jk.exe
Pause
Unloading:
C:\windows\microsoft.net\framework\v2.0.50727\installutil/u C_jk.exe
Pause
Installation and uninstall are written in the bat file and are located in the same folder as the C_jk.exe file.
More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/OS/skills/
Author: csdn Blog dress dance Morning Breeze