Windows process Cleanup Scripts

Source: Internet
Author: User

The company unified with the notebook ThinkPad t440p, super difficult to use, often full of memory, hard disk card dead, but also can not control the machine! The heart that uncomfortable ah! Hey, don't say it.

Wrote a script to force the shutdown of unwanted processes. The script is as follows:

---------------------------------Killtask.bat--------------------------------------

@echo Off & setlocal enabledelayedexpansion

REM The following list is a process that does not need to be closed and can be added by itself
Set ALT=AASD
REM Set alt=%alt% ChsIME.exe
REM Set alt=%alt% ClassicStartMenu.exe
Set alt=%alt% EvtEng.exe
Set alt=%alt% IsaHelp.exe
Set alt=%alt% Jhi_service.exe
Set alt=%alt% LMS.exe
Set alt=%alt% Monitor.exe
Set alt=%alt% NvBackend.exe
Set alt=%alt% osppsvc. Exe
Set alt=%alt% OmniServ.exe
Set alt=%alt% PWMDBSVC.exe
Set alt=%alt% PresentationFontCache.exe
Set alt=%alt% RegSrvc.exe
Set alt=%alt% SMSvcHost.exe
Set alt=%alt% SangforPromoteService.exe
Set alt=%alt% SynTPEnh.exe
REM Set alt=%alt% SynTPHelper.exe
REM Set alt=%alt% SynTPLpr.exe
Set alt=%alt% System
Set alt=%alt% System Idle Process
Set alt=%alt% Tnslsnr. Exe
REM Set alt=%alt% TXPlatform.exe
REM Set alt=%alt% TpShocks.exe
Set alt=%alt% WUDFHost.exe
Set alt=%alt% WmiPrvSE.exe
Set alt=%alt% ZeroConfigService.exe
Set alt=%alt% Audiodg.exe
Set alt=%alt% cmd.exe
Set alt=%alt% Conhost.exe
Set alt=%alt% Csrss.exe
Set alt=%alt% DasHost.exe
Set alt=%alt% Devmonsrv.exe
Set alt=%alt% Dllhost.exe
Set alt=%alt% Dwm.exe
Set alt=%alt% explorer.exe
Set alt=%alt% Extapsup.exe
Set alt=%alt% ISCTAgent.exe
Set alt=%alt% IgfxCUIService.exe
Set alt=%alt% IgfxEM.exe
Set alt=%alt% IgfxHK.exe
Set alt=%alt% inetinfo.exe
Set alt=%alt% Loctaskmgr.exe
Set alt=%alt% Lpdagent.exe
Set alt=%alt% lsass.exe
Set alt=%alt% Micmute.exe
Set alt=%alt% NvSCPAPISvr.exe
Set alt=%alt% Nvvsvc.exe
Set alt=%alt% Nvxdsync.exe
Set alt=%alt% Obexsrv.exe
REM Set alt=%alt% Opvapp.exe
REM Set alt=%alt% Oracle.exe
Set alt=%alt% rundll32.exe
Set alt=%alt% Services.exe
Set alt=%alt% Smss.exe
Set alt=%alt% Spoolsv.exe
Set alt=%alt% Svchost.exe
Set alt=%alt% Taskhostex.exe
Set alt=%alt% Tasklist.exe
Set alt=%alt% Unsecapp.exe
Set alt=%alt% Wininit.exe
Set alt=%alt% Winlogon.exe
Set alt=%alt% Wlanext.exe
Set alt=%alt% Wuauclt.exe
Set alt=%alt% QuickControlInput.exe
Set alt=%alt% QuickControlService.exe
Set alt=%alt% ZhuDongFangYu.exe
Set alt=%alt% 360tray.exe
REM Set alt=%alt% UEStudio.exe

for/f "Usebackq Tokens=1"%%i in (' Tasklist/nh ') do (
REM for/f "Usebackq Tokens=1"%%i in (tasklist.txt) does (
Set Result=no
Call:instrarray%%i
If!result!==ok (
@echo%%i!result! , no need to stop
) Else (
taskkill/f/im%%i
)
)
Goto Endoff

REM Call:instrarray Ui.wu
rem @echo%result%

Goto Endoff

REM Delete Batch function with specified suffix file
: Instrarray
Set%result%=no
For%%i in (%alt%) do (
If "%1" = = "%%i" (
Set Result=ok
Goto Endoff
)
)


: Endoff


---------------------------------------------------------------------------------------------------

Copy the middle part of the line and paste it into Notepad and save it as Killtask.bat.

To use: Right-click on the Killtask.bat, select Run as administrator in the pop-up menu.





Windows process Cleanup Scripts

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.