Jump to content

Process toggler?


Recommended Posts

Posted

Is there a way to toggle a process? I wish to check if a process is running. If it is, stop it. If it isn't, start it. I know nothing of any scripting methods that would accomplish this. TIA!


Posted

???

You don't need every Services on your PC running. I have 5 Services running and the rest are disabled. I also nLite my PC so even though I am on SP2 I only have 38 Services in my list. Cheers.

Posted

Here's an example I found, do with it as you will.

@echo off
FOR /F "tokens=1,2,3,4" %%A IN ('SC.EXE QUERY SPOOLER ^| FIND /I "STATE"') DO SET STATE=%%D
IF /I "%STATE%"=="RUNNING" (NET STOP SPOOLER) ELSE (NET START SPOOLER)

Posted

Thank you very, very much, Yzöwl. That works perfectly for my needs.

@Jeremy, I have also disabled many of my services, but there a some that I need to run occationally and I wanted to have an shortcut that would easily enable or disable the service as I see fit.

  • 4 months later...
Posted

My question is different but not entirely off the thread..

is there a tool to toggle the priority of a process without invoking the taskmanager?

what about permanently changing the process' priority from it's default?

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...