April 24, 200521 yr 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.
April 24, 200521 yr 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
April 24, 200521 yr Author 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*
April 24, 200521 yr 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)
Create an account or sign in to comment