Foofy Posted March 18, 2010 Share Posted March 18, 2010 (edited) Hi everyone, this is my first post here Today as I cleaned a bit my computer, I saw that iTunes created 3 services which always started on boot. Since my computer isn't a high end nor a recent one, I decided to stop these services and start them only when needed : while using iTunes.So I share it here and hope it will be useful to others. (The start/stop services code wasn't quit easy to find )1) Start a service$sSvcName = 'ServiceName' RunWait(@ComSpec & " /c " & 'sc start "' & $sSvcName & '"', "", @SW_HIDE)2) Stop a service$sSvcName = 'ServiceName' RunWait(@ComSpec & " /c " & 'sc stop "' & $sSvcName & '"', "", @SW_HIDE)3) And using it on iTunesTrayTip('Starting iTunes...','', 5) $sSvcName = 'Apple Mobile Device' RunWait(@ComSpec & " /c " & 'sc start "' & $sSvcName & '"', "", @SW_HIDE) $sSvcName = 'iPod Service' RunWait(@ComSpec & " /c " & 'sc start "' & $sSvcName & '"', "", @SW_HIDE) $sSvcName = 'Bonjour Service' RunWait(@ComSpec & " /c " & 'sc start "' & $sSvcName & '"', "", @SW_HIDE) Sleep(500) TraySetState(2) RunWait(@ScriptDir&'\iTunes.exe') $sSvcName = 'Apple Mobile Device' RunWait(@ComSpec & " /c " & 'sc stop "' & $sSvcName & '"', "", @SW_HIDE) $sSvcName = 'iPod Service' RunWait(@ComSpec & " /c " & 'sc stop "' & $sSvcName & '"', "", @SW_HIDE) $sSvcName = 'Bonjour Service' RunWait(@ComSpec & " /c " & 'sc stop "' & $sSvcName & '"', "", @SW_HIDE)Save this script in C:\Program Files\iTunes !Remember : Before using this script, stop the following services and set their startup on manual : (run -> services.msc)Apple Mobile DeviceiPod ServiceBonjour ServiceNow, start this autoit script instead of iTunes.exe It works perfectly on my iTunes 9.0.3.15-Foofy Edited March 18, 2010 by Foofy Link to comment Share on other sites More sharing options...
bo8ster Posted March 19, 2010 Share Posted March 19, 2010 Good script Footy, thanks. This may come in handy if I every have to use it. It can sit in the startup directory. For future reference scripts like this go in the Example Scripts section however I think you need at least 10 posts to post there anyway. Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic] Link to comment Share on other sites More sharing options...
Dead Posted April 11, 2010 Share Posted April 11, 2010 Thank you Big Help 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