Reputation: 300
I already know that the Taskkill /im
command can close a specified application.
However, can you kill all applications (just the programs, not the background processes and Windows processes) currently running in Windows (so if I had a lot of programs opened, could I kill them all)?
For example, instead of writing a really long script that kills every single program (on my computer), would I be able to do something in the format of taskkill /all
?
Upvotes: 1
Views: 3138
Reputation:
You can add other exe to exclude such as smsss.exe and wininit.exe
wmic process where (caption^<^>'svchost.exe' and caption^<^>'csrss.exe') get /format:list
This terminates all notepads
wmic process where caption='notepad.exe' call terminate
Upvotes: 2
Reputation: 10953
You could do something like this:
wmic process get caption
This will return the names of running processes. Use those names to taskkill /m
them, this should at least kill those processes you opened. For some it might be necessary to /f
orce killing them.
But beware: you might be closing yourself, so perhaps a more elaborate approach is needed which will make sure you don't kill yourself ;-)
Upvotes: 2