Recently i have created a Windows service,then i have installed on my windows7 machine.
When i tried start the service i got the follwing error.
“The Service on local computer started and then stopped ,Some services stop automatically if there are not in use by other services or programs.”
I gone through the problem i have tried so many ways to get out of the problem finally i got the solution as follows.
1) Click Run Command from start buttin
2) Enter Services.msc then click OK,you will get all the services in your computer.
3) Select your service and right click on the service and select Properties
4) Goto Logon Properties à select Local System Account then click OK
Now try to start you service you will success.
C# 2008 Programmer's Reference (Wrox Programmer to Programmer)