Thursday, March 6, 2014

Windows Service not appearing in services list after install

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
Luckily i found the solution right away on Stack Overflow.
According to this: 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.


No comments:

Post a Comment