Camarade_Tux Posted December 28, 2006 Share Posted December 28, 2006 (edited) Hi everybody,I've just coded a small AHK script to speedup windows startup.Sometimes windows lags at startup : CPU and HDs are both idle but windows is not started yet.The cause is often a service that is dependant on another which has been set to manual/disabled start.Such dependencies are listed in the registry but there are just too many services to check all of them by hand.My script does nothing on itself : it just displays a message telling "such service is set to start automatically but is dependent upon such other service that is disabled". Then it's up to the user to do the changes. There are two reasons for this : 1) I'm sure there will never be any damage caused by my script, 2) I'm lazy To change a service startup mode, open regedit, go to SYSTEM\CurrentControlSet\Services, select the key with the name that was not between parenthesis (this one is used in services.msc not regedit).In regedit, there are much more services listed than in services.msc. This is because some drivers are included too and services.msc does not lists all services on purpose.The code is really simple:Auto=0Manual=0Disabled=0Loop HKLM, SYSTEM\CurrentControlSet\Services, 2, 0{ RegRead DependOnService, HKLM, SYSTEM\CurrentControlSet\Services\%A_LoopRegName%, DependOnService RegRead Own_Start, HKLM, SYSTEM\CurrentControlSet\Services\%A_LoopRegName%, Start Own_Name := A_LoopRegName RegRead Own_Cute_Name, HKLM, SYSTEM\CurrentControlSet\Services\%A_LoopRegName%, DisplayName Loop Parse, DependOnService, `n { RegRead Dependency_Start, HKLM, SYSTEM\CurrentControlSet\Services\%A_LoopField%, Start Dependency_Name := A_LoopField RegRead Dependency_Cute_Name, HKLM, SYSTEM\CurrentControlSet\Services\%A_LoopField%, DisplayName if (Dependency_Start="2") Auto++ if (Dependency_Start="3") { Manual++ if (Own_Start="2") MsgBox, ( The %Own_Name% (%Own_Cute_Name%) service which is set to start automatically depends on %Dependency_Name% (%Dependency_Cute_Name%)`r but this service is set to start manually. ) } if (Dependency_Start="4") { Disabled++ if (Own_Start="2") MsgBox, ( The %Own_Name% (%Own_Cute_Name%) service which is set to start automatically depends on %Dependency_Name% (%Dependency_Cute_Name%)`r but this service is set to never start. ) if (Own_Start="3") MsgBox, ( The %Own_Name% (%Own_Cute_Name%) service which is set to start manually depends on %Dependency_Name% (%Dependency_Cute_Name%)`r but this service is set to never start. ) } }}MsgBox Auto : %Auto%`rManual : %Manual%`rDisabled : %Disabled%ExitAppYou can copy-past this in a text file and drag-and-drop it over AutoHotKey.exe or get the attached file.Last, could you run the script even if you don't have such lags and post the results here ? Make the message box active and hit Ctrl+CI'm curious about some MS mistakes. PS : if you copied-pasted the code and it doesn't work, get the attached file; I made some modifications inside the codebox so that it doesn't destroy the topic layout (continuation sections).SrvDependency.7z Edited December 28, 2006 by Camarade_Tux Link to comment Share on other sites More sharing options...
Jeremy Posted December 28, 2006 Share Posted December 28, 2006 Or you could use software that doesn't install Services.Or you could configure the Services to Manual. Link to comment Share on other sites More sharing options...
Camarade_Tux Posted December 28, 2006 Author Share Posted December 28, 2006 On my computer, I received:-SENS dependent on COM+, maybe because of nlite use-WZCSVC dependent on ndisuio, same : microsoft services with stock settings (but I dont' know how being a driver influences this)I guess you know Dhcp is dependent on NetBT, which creates a lag when you remove (or at least disable?) NetBT with nlite. Fast no non-microsoft services use the DependOnService key. So everything retrieved here concerns MS services.And as far as I've understood, Manual mode is not designed for such cases : it is for the case the user on himself would want to do a "net start", not for apps to launch their own services. Source :0x3 Service Available, regardless of type,(Load on Control but will not be started untildemand) Manager the user starts it (for example, by using the Devices icon in Control Panel). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now