Jump to content
Can't remember your login details? Read more... ×
robzy

Service control

Recommended Posts

So I'm running Windows 7.

 

And I have no trouble with Windows Search, Apple, Superfetch etc. services running most of the time - I have enough RAM for it.

 

But often before I fire up some virtual machines I want to free up a couple of hundred megs, which means going into Process Explorer and manually stopping the stuff I want stopped.

 

This is a bit annoying.

 

I'm sure I could write some .bat (or other) scripts to do it, but I'd rather do it via a nice simple GUI that allows me to quickly and easy add services to the stop/start groups.

 

Any suggestions?

 

Rob.

Share this post


Link to post
Share on other sites

So you want a GUI app which stop/starts groups of Windows services ... never seen one of those apart the usual Windows Services manager app thingy - run "services.msc"

Edited by Jeruselem

Share this post


Link to post
Share on other sites

Sorry, I'm looking for something more configurable than services.msc .

 

I'm wanting to click one button, and it will automatically shut down the list of services I defined earlier. I can then click another button (or the same one, I'm easy :P) and they start up again.

 

As mentioned, a script could do this, but I'm wanting something with easily configurable lists.

 

Rob.

Share this post


Link to post
Share on other sites

i've written tonnes of scripts that do just this at work.

 

you could hard code the specific services to kill, read them in out of a txt file, or if you like wasting time (in which case, i'd just do it manually via services.msc) you can enter them individually when prompted.

 

Personally, i'd go the first option. If i'm about to start canning scripts at the click of a button, i will have a fully researched list of services beforehand. Adding to that list would be simple, and honestly not something i'd expect to do all that often.

 

 

 

alternatively, and i'd say this would be the easiest option, i'd say grab a copy of pstools, extract and copy to system32, and then write a batch file to do just that.

 

Hell, even the following incredibly ugly (yet simple) solution will do the job and the most time it takes is for you to c+p the service names to the batch file:

 

psservice stop servicename1

psservice stop servicename2

psservice stop servicename3

 

 

and conversely to start them

 

psservice start servicename1

psservice start servicename2

psservice start servicename3

 

 

 

if you wanted to shut down processes as well, you can just add the following to your bat files:

 

pskill processname1.exe

 

and to start them again

 

psexec file.exe

 

 

its a very, very ugly and simple way of doing it without error checking, but it depends on how deep into it you want to go. Personally, i've got shitloads of vbscript at work that i just recycle across our servers and modify as necessary. Yes, i *could* just use the above examples, but i'm not exactly dealing with an environment that all is ok after a reboot :P

Share this post


Link to post
Share on other sites

Thanks for the suggestion Juggs, I've come across psexec before (back in my script-kiddie days) but I was rather hoping for something where it would be easier to create "groups" of services to turn on and off.

 

But failing that, your suggestion of a script with a separate file for services names might work. Thanks.

 

Rob.

Share this post


Link to post
Share on other sites

batch files; 'net stop' and 'net start' commands.

I'm sure I could write some .bat (or other) scripts to do it, but I'd rather do it via a nice simple GUI that allows me to quickly and easy add services to the stop/start groups.

As mentioned, a script could do this, but I'm wanting something with easily configurable lists.

I was rather hoping for something where it would be easier to create "groups" of services to turn on and off.

Rob.

Share this post


Link to post
Share on other sites

well each batch would have its 'group' and you could even have a batch to execute the other ones. Make yourself a number driven CLI.

 

All you need to know is the names of the service, once you've set it up once, its done. (and machine portable).

Share this post


Link to post
Share on other sites

I have done something similar with process explorer in the past. V12 has been release recently which has more features in the way of services too. It probably won't do everything that you want, but it may help you get there.

 

http://www.h-online.com/security/news/item...ces-966029.html

I've been running v11, thanks for the heads up on the update. Unfortunately I don't really notice a difference :P

 

Rob.

Share this post


Link to post
Share on other sites

I have done something similar with process explorer in the past. V12 has been release recently which has more features in the way of services too. It probably won't do everything that you want, but it may help you get there.

 

http://www.h-online.com/security/news/item...ces-966029.html

I've been running v11, thanks for the heads up on the update. Unfortunately I don't really notice a difference :P

 

Rob.

 

No worries- bit of a long shot that it would help but you never know. Very handy program (as most of the sysinternals range are).

Share this post


Link to post
Share on other sites

Lazy sod.

 

Spend 30 minutes building one.

 

Simple powershell scripts through html that generate and run ps commands to terminate certain services, and throwin some tick boxes to allow saving services and processes as certain groups.

 

In the 3 days the thread has been running, you'd have nailed it.

Share this post


Link to post
Share on other sites

Simple powershell scripts through html that generate and run ps commands to terminate certain services, and throwin some tick boxes to allow saving services and processes as certain groups.

"Powershell through HTML"? Tick boxes? Colour me interested.

 

But I've been spending the past 3 days studying and programming more interesting things :P

 

Rob.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×