I wrote an windows service and starting it manually, it works fine.
But it just won't start on windows start-up and I don't know why.
When windows starts, my service's status is "Getting startet...". And that's it!
Once I click on "start service" it starts and works fine!
Here is the code I'm using:
[
RunInstaller(true)]public class ProjectInstaller : Installer
{
public ProjectInstaller()
{
ServiceProcessInstaller spi = new ServiceProcessInstaller();
spi.Account = ServiceAccount.LocalService;
//spi.Account = ServiceAccount.LocalSystem; //I tried that as well...
ServiceInstaller si = new ServiceInstaller();
si.ServiceName = "AssetDataCollector";
si.StartType = ServiceStartMode.Automatic;
Installers.AddRange(new Installer[] {spi, si});
}//ProjectInstaller
...
I acrually didn't write this code, the IDE wrote it...
Thanks,
Finch.

Service doesn't start-up
Krishnaswin
I located the problem:
It was not due to my empty OnStart()-Method. It is still empty...
The problem was cased by the FTP-connection I establish. When the server cannot be reached, the service won't start automatically, but can be started manually.
Since my service get's alot of information about the computer using WMI, I have to wait until all drivers and devices are ready, so I added the following depency:
si.ServicesDependedOn = new string[] {"winmgmt"};
No everythink works like it's supposed to!
Thanks everybody for helping me,
Finch.
Bio_Hazard
Michael Taylor - 11/28/05