EFileTahi-A
Contributor
Hello guys, it has been a while...
I need to run my application in background, before anyone logs in the computer. After some research I ventured myself in creating a Windows Service to do the trick.
I've created this windows service but I simply can't make it execute my application (SQLGuardian.exe):
This service runs great, and appears in the services list, but when I start it nothing happens, except for a message saying that it opened and it closed after, as there were no work to do. The OnStart event is never called, not even when I'm debuging it, and I don't have the slightest clue why not.
Anyway, If there is a simpler way of executing an application before login, well, I'm all ears! It should work on Windows Server 2003 though.
Thanks for any help on the subject!
I need to run my application in background, before anyone logs in the computer. After some research I ventured myself in creating a Windows Service to do the trick.
I've created this windows service but I simply can't make it execute my application (SQLGuardian.exe):
Code:
public partial class Service1 : ServiceBase
{
public Service1()
{
InitializeComponent();
}
protected override void OnStart(string[] args)
{
MessageBox.Show("Service Started!");
Process.Start("D:\\SQLGuardian.exe");
}
protected override void OnStop()
{
}
}
This service runs great, and appears in the services list, but when I start it nothing happens, except for a message saying that it opened and it closed after, as there were no work to do. The OnStart event is never called, not even when I'm debuging it, and I don't have the slightest clue why not.
Anyway, If there is a simpler way of executing an application before login, well, I'm all ears! It should work on Windows Server 2003 though.
Thanks for any help on the subject!
Last edited: