In my windows 7 machine, I have a lot of services that I keep turned off. I turn them on only when I actually needed them. This keeps my computer working better than if I had all of the services running at the same time.
So every time that I need to turn them on, I have to manually go to the Services control and start each service. Pursuing the goal of attempting to automate as many repetitive tasks as possible, I wrote this small ruby script that, when one runs it as administrator (windowsese for sudo), it will start both of them up with one action and less time.
services = ['Apache2.2', 'MySQL'] services.each do |service| command = "net start #{service}" system command end