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-06-25 12:29
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Why does this VBS script restart the Windows Explorer on my computer? View 3,063 Replies 15
Original Poster Posted 2006-12-20 08:15 ·  中国 安徽 芜湖 电信
高级用户
★★★
Credits 906
Posts 346
Joined 2006-07-10 09:58
19-year member
UID 58334
Gender Male
Status Offline
Set WSHShell = WScript.CreateObject("WScript.Shell")
WSHShell.SendKeys "{F5}+{F10}e"

This was originally a refresh script. But on my computer, it just restarts the Explorer. Please help try it. Please ask the experts for guidance
Floor 2 Posted 2006-12-20 08:22 ·  中国 北京 海淀区 方正集团
中级用户
★★
Credits 404
Posts 179
Joined 2006-03-30 14:44
20-year member
UID 53056
Status Offline
It is estimated that explorer has crashed and restarted by itself
Floor 3 Posted 2006-12-20 08:28 ·  中国 安徽 芜湖 电信
高级用户
★★★
Credits 906
Posts 346
Joined 2006-07-10 09:58
19-year member
UID 58334
Gender Male
Status Offline
It restarts only each time this script is run.
Floor 4 Posted 2006-12-20 11:49 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
19-year member
UID 59080
Status Offline

  Running on the desktop, the desktop icon flickers for a moment, which is refreshing, normal.
Floor 5 Posted 2006-12-20 13:51 ·  中国 广西 玉林 博白县 电信
金牌会员
★★★★
Credits 3,687
Posts 1,467
Joined 2005-08-08 12:00
20-year member
UID 44210
Status Offline
WSHShell.SendKeys "{F5}+{F10}e"
The main function is to call the "Refresh" in the right-click menu, and it works effectively on the desktop, within folders, and in IE windows; in specific cases, it becomes tiling all windows (specifically what the situation is is not known)
Floor 6 Posted 2006-12-21 22:46 ·  中国 安徽 芜湖 电信
高级用户
★★★
Credits 906
Posts 346
Joined 2006-07-10 09:58
19-year member
UID 58334
Gender Male
Status Offline
Got it. Hehe. Originally I placed a shortcut on the desktop to end and restart the Explorer, with the shortcut key F5. No wonder. Hehe
Floor 7 Posted 2007-01-24 03:09 ·  中国 河北 保定 联通
银牌会员
★★★
Credits 1,513
Posts 554
Joined 2005-12-30 00:50
20-year member
UID 48180
Gender Male
Status Offline
Originally posted by eech at 2006-12-21 22:46:
Got it. Hehe. Originally I had a shortcut on the desktop to end and restart Windows Explorer, with the shortcut key set to F5. No wonder. Hehe


Ask for advice: Is there a specific command to end and restart Windows Explorer?
Like in WinME: RUNDLL32 SHELL32.DLL,SHExitWindowsEx -1

In addition to these:
wmic process where "name='Explorer.exe'" call terminate
ntsd -c q -p pid'''explorer-pid
ntsd -c q -pn Explorer.exe
taskkill /im Explorer.exe /f

[ Last edited by baomaboy on 2007-1-24 at 04:39 AM ]
Floor 8 Posted 2007-01-24 06:49 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
19-year member
UID 59080
Status Offline
Originally posted by baomaboy at 2007-1-23 14:09:

Ask: Is there a specific command to end and restart Windows Explorer?
For example, under WinME: RUNDLL32 SHELL32.DLL,SHExitWindowsEx -1
Besides these:
wmic process where "name='Explorer.exe'" call te ...


  May I ask if it's to collect commands to end processes or for other purposes? Aren't so many commands enough?
Floor 9 Posted 2007-01-24 07:13 ·  中国 广东 湛江 电信
高级用户
★★★
Credits 959
Posts 311
Joined 2006-04-11 14:08
20-year member
UID 53665
Gender Male
From 广东-LianJiang
Status Offline
Originally posted by lxmxn at 2007-1-24 06:49:


May I ask if it is for collecting commands to end processes, or for other purposes? Are so many commands not enough?


Haha, hit the nail on the head, is the seventh floor having ulterior motives......
κχυμγνξοθπρωψιαδλεηφβτζσ┬╀┾┳┞┯┰┱┣┲┳╂╁│├┟┭┠这是什么??这就是我的人生
Floor 10 Posted 2007-01-24 09:26 ·  中国 河北 保定 联通
银牌会员
★★★
Credits 1,513
Posts 554
Joined 2005-12-30 00:50
20-year member
UID 48180
Gender Male
Status Offline
^_^
Actually, I just want to know more ways to solve a problem...
I want to know both shortcuts and roundabout and cumbersome methods. I believe I'm not the only one here who has such an idea.
Floor 11 Posted 2007-01-24 09:34 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
19-year member
UID 59080
Status Offline

I know the following few:

  • taskkill /f /im <ProcessName>
  • taskkill /f /pid <ProcessID>
  • ntsd -c q -pn <ProcessName>
  • ntsd -c q -pid <ProcessID>
  • tskill <ProcessID>/<ProcessName>
  • wmic process where "name='<ProcessName>'" call terminate
  • wmic process where "processid=<ProcessId>" call terminate
  • rundll32.exe ……
Floor 12 Posted 2007-01-24 12:14 ·  中国 河北 保定 联通
银牌会员
★★★
Credits 1,513
Posts 554
Joined 2005-12-30 00:50
20-year member
UID 48180
Gender Male
Status Offline
Floor 13 Posted 2010-11-20 12:01 ·  中国 江西 南昌 电信
新手上路
Credits 2
Posts 2
Joined 2010-04-06 22:14
16-year member
UID 163930
Gender Male
Status Offline
It seems it doesn't work on my computer.
Floor 14 Posted 2010-11-20 12:06 ·  中国 江西 南昌 电信
新手上路
Credits 2
Posts 2
Joined 2010-04-06 22:14
16-year member
UID 163930
Gender Male
Status Offline
The command taskkill /f /im Explorer.exe on Win7 cannot be executed
Floor 15 Posted 2010-11-21 13:55 ·  中国 台湾 中华电信(HiNet)
初级用户
Credits 34
Posts 22
Joined 2010-11-20 09:26
15-year member
UID 177913
Gender Male
Status Offline
Got to study it well...
Forum Jump: