After some investigations, I finally found a solution :
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ServiceGroupOrder:List
In this list you can add your proper group, assign your service to the
group. Windows will start services by group following the order they
appear in "List".
To make the service start before logon screen :
* activate "SyncForegroundPolicy" to make windows wait for the network
to be up before showing logon screen
* put a new group "mygroup" in ServiceGroupOrder:List, the correct
place seems to be between :
NetworkProvider
mygroup
RemoteValidation
* configure service to be member of "mygroup" :
'sc config myservice group= mygroup' (note the space between equal sign
and "mygroup")
Beside to that it is necessary to use
self.ReportServiceStatus(win32service.SERVICE_START_PENDING)
and
self.ReportServiceStatus(win32service.SERVICE_RUNNING)
at the correct place otherwise windows will think service has started
while in fact it has not finished to.
Hope this helps, I spend a couple of hours to find this solution, it is
not well documented on msdn.
Maybe this for search engine :
wait service start logon screen login screen
wait NT service
le dahut wrote :
Hello,
Is it possible to tell windows to wait a python service has started
before the login prompt is displayed ?
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32