|
bgwzlgf9610
初级用户
  我很想学DOS
积分 30
发帖 12
注册 2007-4-28
状态 离线
|
『楼 主』:
如何关闭所有窗口
使用 LLM 解释/回答一下
xp系统下用户经常会同时打开很多窗口,如经常打开十几个网页和程序,造成系统资源紧张,运行速度很慢。想用cmd做一个批处理,强制把所有打开的窗口和程序关掉,但不是关机或注销,请教如何来做。
Last edited by bgwzlgf9610 on 2007-4-27 at 04:36 PM ]
In the Windows XP system, users often open many windows simultaneously, such as frequently opening a dozen web pages and programs, which causes system resource strain and slow running speed. I want to use cmd to make a batch script to forcibly close all open windows and programs, but not to shut down or log off. Please teach me how to do it.
Last edited by bgwzlgf9610 on 2007-4-27 at 04:36 PM ]
|
|
2007-4-28 05:04 |
|
|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
可以先将一个进程列表写进一个文件,比如里面存放要关闭的进程,然后用批处理读取其中的内容来关闭相关的进程以达到目的。这个文件也可以存放不关闭的进程的列表。
You can first write a process list into a file, for example, store the processes to be closed in it, and then use a batch script to read the contents of this file to close the relevant processes to achieve the purpose. This file can also store the list of processes that are not to be closed.
|
|
2007-4-28 06:42 |
|
|
bgwzlgf9610
初级用户
  我很想学DOS
积分 30
发帖 12
注册 2007-4-28
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
谢谢lxmxn版主。
我这里所说的说是学生随机打开的网页、游戏和程序窗口等,那如何区别我得到的进程列表的内容,以不关闭系统进程而只关闭我想关闭的内容?
Thanks, moderator lxmxn.
What I'm talking about here is the randomly opened web pages, games, and program windows by students. Then how to distinguish the content of the process list I get, so as not to close the system processes but only close the content I want to close?
|
|
2007-4-28 23:25 |
|
|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
Re bgwzlgf9610:
你可以把系统的几个主要进程写在1.txt里面,一行一个,然后写一个批处理,来结束不在这个文件中的进程,这样就可以关闭你想关闭的进程了。
1.txt里面的内容实际上就是你不想关闭的进程列表。
Re bgwzlgf9610:
You can write several main processes of the system in 1.txt, one per line, and then write a batch script to end processes that are not in this file, so that you can close the processes you want to close.
The content in 1.txt is actually the list of processes you don't want to close.
|
|
2007-4-29 02:48 |
|
|
bgwzlgf9610
初级用户
  我很想学DOS
积分 30
发帖 12
注册 2007-4-28
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
版主的想法非常有启发性,谢谢了先。
但我试了很久也没有实质性的进展,不知版主能不能劳烦给一个具体的实例。
如:有三个进程,explorer、csrss和xiandan.exe,我想结束xiandan.exe而保留explorer、csrss。
在1.txt中是否可以这样写:
explorer
csrss
。
关键是批处理应该如何来做,我不会,试着做了很长时间也没有完成。从论坛上找了很久也没有找到我要的内容。
The ideas of the moderator are very inspiring, thank you first.
But I have tried for a long time without substantial progress. I wonder if the moderator can be so kind as to give a specific example.
For example: There are three processes, explorer, csrss and xiandan.exe. I want to end xiandan.exe while keeping explorer and csrss.
Can it be written like this in 1.txt:
explorer
csrss
.
The key is how to do it with a batch script. I don't know how. I have tried for a long time and haven't completed it. I have searched for a long time on the forum and haven't found the content I want.
|
|
2007-4-29 03:56 |
|
|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
Re bgwzlgf9610:
你的1.txt可以写上要结束的进程,比如:
xiandan.exe
qq.exe
然后用这个:
@echo off
for /f "tokens=" %%a in (1.txt) do taskkill /f /im %%a 2>nul
Re bgwzlgf9610:
Your 1.txt can write the processes to end, for example:
xiandan.exe
qq.exe
Then use this:
@echo off
for /f "tokens=" %%a in (1.txt) do taskkill /f /im %%a 2>nul
|
|
2007-4-29 04:11 |
|
|
bgwzlgf9610
初级用户
  我很想学DOS
积分 30
发帖 12
注册 2007-4-28
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
谢谢lxmxn的热心帮助和辛苦劳动。
我已经会解决类似的问题了。
Thanks to lxmxn for his enthusiastic help and hard work.
I have already known how to solve similar problems.
|
|
2007-4-29 04:23 |
|