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.
If you've been using InstallUtil.exe to install your Windows service, then that means you've added a ProjectInstaller component to your service. All the InstallUtil.exe does is use reflection to find the installer component embedded in your service and execute some methods on it. Due to this, you can modify your Windows service to install and uninstall itself, i.e., you no longer have to depend on InstallUtil.exe being available on the target machine. I've been using this successfully for several months now. Just follow the step-by-step I provided here. The idea originally belongs to Marc Gravell and this post.
The message:
"Error 1053: The service did not respond to the start or control request in a timely fashion."
is typically a generic response to an issue starting the Windows Service. What you should do is check the event log and likely you will find the real error that is preventing the service from starting.
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