tags:

views:

29

answers:

1

My system has a service (Serv.exe) which starts as LocalSystem and should be running at all times, additionally on startup of the PC (auto logon) the user has a STARTUP application (App.exe) which runs.

Sadly I've found that sometimes App.exe starts to run before Serv.exe has finished starting, and one of the first thing App.exe does is communicate with Serv.exe (which obviously fails).

So, I am looking for the proper way to handle this situation (I assume it isn't that rare)... I know I can query the service from App.exe for a specific amount of time (loop) but that doesn't seem like a clean solution.

One thought I had ... just not sure if it is possible ... can you delay windows from allowing the user to login (or autologin) until the LocalSystem Services are running?

Any help/hints would be greatly appreciated. Thanks,

A: 

A timed loop would be the way to go. Windows is obviously treating them as asynchronous, and the simplest way to handle asynchronous events is to loop and verify.

Guvante