Here's the scenario: you are a programmer in both hobby and career, but you've got other hobbies, like video games. But first and foremost, you are a programmer… So not only do you have a number of video games sucking up precious hard drive space, you have a full blown installation of Visual Studio, Sql Server Express, IIS, all running on your local machine. Come game time, you've got all these services sitting around waiting to be used in some development, meanwhile you're trying to get max frames-per-second with Crysis…
Not a big deal, Windows+R then "services.msc" and those pesky services down, get your game on and then… Oh wait, some more development… Back to services.msc and turn them back on. Gets very old, very quick…
So I decided to do a little something about it, a very little something, I wrote a batch file to present a little start or stop menu and start up the services or shut them down.
Here is a list of services I felt like adding in there, there could be more… I could have turned off svncache, etc… I figured why bother… The list I used is:
- SQL Server (SQLEXPRESS)
- SQL Server Browser
- SQL Server VSS Writer
- World Wide Web Publishing Service
- IIS Admin Service
- Machine Debug Manager
Not terribly clean, and I probably could have done it with a windows app with c#, but it would have been so much work for the same result. Anyway, enjoy!
Caveat: With Widnows 7 (or Vista) with the UAC enabled, you'll want to right-click on the .bat or shortcut to it and and run it as Administrator so that it has permissions to stop or start the windows services.
The contents of the code above are conveniently located below under Attachment's for this entry. Cut down on the cut and paste errors 😉
Trackback URL for this post: