ODC Posted December 24, 2004 Share Posted December 24, 2004 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! Link to comment Share on other sites More sharing options...
Jeremy Posted December 24, 2004 Share Posted December 24, 2004 ???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. Link to comment Share on other sites More sharing options...
Yzöwl Posted December 24, 2004 Share Posted December 24, 2004 Here's an example I found, do with it as you will.@echo offFOR /F "tokens=1,2,3,4" %%A IN ('SC.EXE QUERY SPOOLER ^| FIND /I "STATE"') DO SET STATE=%%DIF /I "%STATE%"=="RUNNING" (NET STOP SPOOLER) ELSE (NET START SPOOLER) Link to comment Share on other sites More sharing options...
ODC Posted December 24, 2004 Author Share Posted December 24, 2004 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. Link to comment Share on other sites More sharing options...
Jeremy Posted December 24, 2004 Share Posted December 24, 2004 Ah, I see. I misunderstood. My bad. Very interesting, though. Link to comment Share on other sites More sharing options...
f0r5aK3n Posted May 14, 2005 Share Posted May 14, 2005 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? Link to comment Share on other sites More sharing options...
KJxp Posted May 16, 2005 Share Posted May 16, 2005 You can't permanently change it that I know of, but you can change it for the current running session of the program using the command line part of ProcessViewer. 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