I have developed a Windows service using Visual Studio 2008. I want to install that service in a machine where Visual Studio is not installed, but .NET 3.5 is installed.
Generally InstallUtil.exe shall be used for installing a Windows Service, but the InstallUtil.exe utility is not available in .NET 3.5. When I tried installing that service using .NET 2.0, the service is getting displayed in the list of services but when starting the service Windows Service error 1053 is coming. How we can avoid this problem and successfully install the service?
It's actually really simple as I just did it a couple of days ago for something I made.
So in your service project you want to:
Now you need to make a setup project. The best thing to do is use the setup wizard.
Now you need to edit your installer to make sure the correct output is included.
Now just build your installer and it will produce an MSI and a setup.exe. Choose whichever you want to use to deploy your service.
There's a Microsoft KB on this for .Net 2.0 and VS2005. The procedure is exactly the same in .Net 3.5 and VS2008.
http://support.microsoft.com/kb/317421
And here's a nicer article with pictures to make it clearer. (Sometimes the KB's aren't as friendly as tutorials you can find elsewhere.)
http://aspalliance.com/1316_Working_with_Windows_Service_Using_Visual_Studio_2005.3
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With