China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-15 01:23
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » --- -- End all processes except the main ones ? View 2,823 Replies 15
Floor 16 Posted 2007-04-22 09:24 ·  中国 北京 宽捷网通信技术有限公司
初级用户
Credits 84
Posts 28
Joined 2006-05-03 22:36
20-year member
UID 54894
Gender Male
Status Offline
Originally posted by everest79 at 2007-4-22 07:49:
According to your requirement


for /f "skip=3" %i in ('wmic process get name^|findstr /v /i "smss.exe csrss.exe winlogon.exe services.exe lsass.exe svchost.exe explorer.exe"') do echo ...


Brilliant. Although I also thought of findstr, I felt like using errorlevel to judge it... not as clever as brother everest79's method
Forum Jump: