[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
找到一个 PowerShell 方案, 但我没测试
来源 http://stackoverflow.com/questio ... ndows-in-powershell
  1. $a = (New-Object -comObject Shell.Application).Windows() |
  2. ? { $_.FullName -ne $null} |
  3. ? { $_.FullName.toLower().Endswith('\explorer.exe') }
  4. $a | % {  $_.Quit() }
复制代码
另有一个 AHK 方案, 测试通过, 不会 kill 掉 桌面, 因为只是关窗口, 并没有 kill explorer 的进程
来源 https://autohotkey.com/board/top ... l-explorer-windows/
  1. GroupAdd,ExplorerGroup, ahk_class CabinetWClass
  2. GroupAdd,ExplorerGroup, ahk_class ExploreWClass
  3. ; close all Explorer windows when Winkey x pressed
  4. #x::
  5.   if ( WinExist("ahk_group ExplorerGroup") )
  6.     WinClose,ahk_group ExplorerGroup
  7. return
复制代码
1

评分人数

TOP

返回列表