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-08-02 07:09
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Help] How to use batch processing to close and reopen the explorer process View 4,071 Replies 16
Floor 16 Posted 2006-10-17 03:56 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline
Originally posted by 002500 at 2006-10-16 01:09:
It's strange that using a batch script to close explorer didn't succeed but the shutdown interface popped up?

C:\>taskkill /im explorer.exe
SUCCESS: The process "explorer.exe" with PID 7864 has been terminated. ...


  Hehe, it's not a virus. Try this command and the shutdown dialog won't appear:

taskkill /im explorer.exe /f


[ Last edited by lxmxn on 2006-10-17 at 03:58 ]
Floor 17 Posted 2006-10-17 06:51 ·  中国 山东 淄博 联通
中级用户
★★
Credits 272
Posts 99
Joined 2006-06-02 09:12
20-year member
UID 56414
Status Offline
楼主请听我说

Explorer.exe is the foreground process of the system.

In the case of abnormal termination, for example, using the following form:
ntsd -c q -pn explorer.exe

The system will consider this as an unexpected operation and automatically restart Explor.exe. So the next sentence of the owner,
c:\windows\explorer.exe
will be executed when Explorer has been restarted, that is, opening the Windows Explorer.

If you want to end this process without automatic recovery, one way is to force kill the process in the Windows built-in Task Manager. The scripted method has not been discovered yet, leaving it for the experts to continue exploring.
Forum Jump: