phate_zn Posted April 24, 2005 Posted April 24, 2005 Hey I am making a batch file that helps people like me with crap pc's to get more cpu power out by stopping all processes except those that are truly vital. I have wriitne enough to stop all the servives and a "start" line to run a vbs script that frees up ram but i havent managed to stop processes running in the background like hp printer processes and that such. I need them running while i am working but games are a different story so stoppijng them starting up is out of the story.I know that the command taskkill used to do the job but it doesnt seem to do it any more.All the help will be appreciated.
Martin Zugec Posted April 24, 2005 Posted April 24, 2005 You could create little "database" consisting two filesProcesses.batIf "%1" EQU "" goto :EOFIf /i %1 EQU /start goto StartProcessIf /i %1 EQU /stop goto StopProcessGoto :EOF:StartProcessfor /f "usebackq" %%i IN (`type Processes.ini`) DO ( cmd /c start %%i )Goto :EOF:StopProcessfor /f "usebackq" %%i IN (`type Processes.ini`) DO ( wmic process where name="%%i" call terminate )Goto :EOFProcesses.ininame_of_process.exeIf you run processes.bat with parameter /start, it will launch all processes from processes.ini, if you start it with /stop, it will kill them all
phate_zn Posted April 24, 2005 Author Posted April 24, 2005 Soulin you are the man thanks that fixed my problem prefectly. I should be finished in about an hour. I just have to touch up and try it out. But thanks so much. once agian thanks alot. *clap**clap*
Martin Zugec Posted April 24, 2005 Posted April 24, 2005 First try it Maybe it wont work (I am using w2k right now and the script is designed for XP, so I wasnt able to try it here)
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