I just created a new windows service and I am having issues with the installer.
I created the installer via this tutorial: http://www.sarin.mobi/2008/08/c-windows-service-visual-studio-2008/
Anyway, when I run the .msi generated by VS, the executable for this project is installed where I expect it to be. However, the service does not appear in Windows Services.
When I use the VS command line tool and installutil, everything works just fine.
I have created services in the past, so I compared the ProjectInstaller files and the installer configuration with past projects and see no significant differences.
Any advice?
To install a service, you need to add a
ServiceInstallerand aServiceProcessInstallerto the service project, then add custom actions to the installer to run them. I’m pretty sure it’s the custom actions part you’re missing.Now when you build the installer and execute it, the installers you’ve created in step 3 will be executed, adding your service and setting all properties.
HTH,
James