Thursday, March 6, 2014

Windows Service not appearing in services list after install

Problem
After running a service installer I am not seeing the service in the services list, and trying to start the service results in it saying something like "The service is not on this computer"
Note: The installer was made in a VS Setup project
Solution
Luckily i found the solution right away on Stack Overflow.
According to this: http://www.codeproject.com/KB/dotnet/simplewindowsservice.aspx you need to do the following steps to ensure the service executable is registered as a service:
1.In Solution Explorer, right-click the setup project, point to View, then choose Custom Actions. The Custom Actions editor appears.
2.In the Custom Actions editor, right-click the Custom Actions node and choose Add Custom Action. The Select Item in Project dialog box appears.
3.Double-click the application folder in the list box to open it, select primary output from MyNewService (Active), and click OK. The primary output is added to all four nodes of the custom actions � Install, Commit, Rollback, and Uninstall.
4.Build the setup project.

References
 http://stackoverflow.com/questions/1560407/windows-service-not-appearing-in-services-list-after-install

No comments:

Post a Comment

There was an error in this gadget