Code:
public partial class VladaCustomService1 : ServiceBase
{
public VladaCustomService1()
{
InitializeComponent();
}
protected override void OnStart(string[] args)
{
MessageBox.Show("On Start()");
}
protected override void OnStop()
{
MessageBox.Show("On Stop()");
}
}
public partial class VladaCustomService1 : ServiceBase
{
public VladaCustomService1()
{
InitializeComponent();
}
protected override void OnStart(string[] args)
{
MessageBox.Show("On Start()");
}
protected override void OnStop()
{
MessageBox.Show("On Stop()");
}
}
Dodao sam installer i setup projekat, instalirao service, i kada pokrenem start service dobijem sledecu poruku:
Citat:
The Service1 service on Local Computer started and then stopped. Some services stop automaticly if they are not in use by other services or programs.
Ne kapiram sto se gasi???
/edit
Probao sam sa timer-om nece ni tako jednostavno se gasi sta god promenim

[Ovu poruku je menjao Valerij Zajcev dana 21.06.2010. u 17:59 GMT+1]