批处理之家's Archiver

anshi009009 发表于 2019-6-6 19:25

求帮忙纠错VBS需要执行代码之后关闭所有已经打开的文件管理器窗口

[code]Set wins = CreateObject("Shell.Application").Windows
If not IsNull(wins) Then
    For Each w In wins
        If InStr(LCase(w.FullName), "\explorer.exe") >0 Then w.Quit
    Next
End If
[/code]原本需要执行代码之后关闭所有已经打开的文件管理器窗口,但是以上代码执行后只关闭了部分窗口。


本人小白一枚,求高手指点这行代码错在哪里了

ivor 发表于 2019-6-6 20:37

[code]powershell "Stop-Process -Name explorer"[/code]

anshi009009 发表于 2019-6-7 09:10

[b]回复 [url=http://www.bathome.net/redirect.php?goto=findpost&pid=220810&ptid=53014]2#[/url] [i]ivor[/i] [/b]
首先感谢,但是您这行命令会导致explorer重启,造成机器卡顿。这并不是我所希望的。

页: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.