This thread comes up when you search for information about this problem : "how to make my service start before logon screen appears". That's why I post this information here (this is not 4 years lag).

I had found a solution for XP which was to add the service in a servicegroup called "NetworkProvider" :
 sc config myservice group= NetworkProvider

On Vista/Seven just change the group name to "Network" :
 sc config myservice group= Network

http://technet.microsoft.com/en-us/library/cc976063.aspx
http://technet.microsoft.com/en-us/library/cc976127.aspx

Note that "Network" group is not listed in SYSTEM\CurrentControlSet\Control\ServiceGroupOrder\List but it exists as there are some services (like RPCSS ;-) ) which have "Network" as "Group".
Take a look at HKLM\SYSTEM\CurrentControlSet\Services\EventSystem.



Hope this helps.
 Klaas



On 11/06/2008 18:59, Tim Roberts wrote :
spoirot wrote:
I totally agree with you. I have found another dependency to use :
Themes, which is less heavy than RPCSS.
This works, but it does not make exactly what I want.

Plus, it is simply not an acceptable practice for you to change some
other service's dependencies.


Indeed, I would like to set some values in a HKLM subkey
at windows boot, in order that changes are effective as soon as a user
logs in after boot sequence.

Why?  What are you really trying to do here?  What you're describing
sounds like a perfect vector for malware and trojan horses.

You can certainly have a domain login script that gets executed very
early in the login sequence.  That's how most corporate environments
enforce their IT policies.


In my case,
registry values are well written, but changes aren't effective yet...
So user needs to reboot.
I tried to use the FlushKey() method from _winreg module in order to
immediately write changes to registry.
Changes are written, but not effective. I thought that user's login
refreshed the registry, and then changes could
have taken effect, but it seems not to be really the case.

Which registry entries are you changing?  Perhaps there is another way.


Is there any other Python _winreg method that could force registry
changes to become effective as soon as
changes are written into the registry ?

This is just not the right question.  Any changes take effect
immediately, but if some other process has already read the value,
there's nothing you can do, unless there's a way to notify the other
process to re-read its settings.

_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to