Windows Service not appearing in services list after install

后端 未结 9 1437
刺人心
刺人心 2020-11-30 20:06

I\'ve created a windows service in C#, using Visual Studio 2008 I pretty much followed this: http://www.codeproject.com/KB/dotnet/simplewindowsservice.aspx

I created

9条回答
  •  星月不相逢
    2020-11-30 20:26

    Here is a good tutorial from tgeek001 from CodeProject.com that helped me. It includes several things I didn't see in the posts above: 1. Event handler code to stop the service before uninstalling it 2. Specific conditions and properties in the Custom Actions code to set in order to prevent failures (these fixed the Error 1001 that I experienced while following the instructions in the accepted answer above) 3. Win Service property "Remove Previous Version" dropdown set to true

    http://www.codeproject.com/Tips/575177/Window-Service-Deployment-using-VS

    The following is from the tutorial for Custom Actions Settings (case matters):

    • Install, set the Condition property to the following: "NOT (Installed or PREVIOUSVERSIONSINSTALLED)"
    • Uninstall, set the Condition property to: "NOT UPGRADINGPRODUCTCODE"
    • Commit: set "Custom Action Data" field to: /OldProductCode="[PREVIOUSVERSIONSINSTALLED]"

    Lastly, in the WinService project, make sure to set the dropdown "Remove Previous Versions" to true.

    cheers

提交回复
热议问题