本帖最后由 yu2n 于 2015-5-6 22:19 编辑
Mark.
【更新】坛友 CrLf 提醒explorer打开路径可用复制代码 VBS代码如下:- Call RestartExplorer()
- Function RestartExplorer()
- Dim arrURL(), strURL, oShell, oWin, n
- n = -1
- Set oShell = CreateObject("Shell.Application")
- For Each oWin In oShell.Windows
- If Instr(1, oWin.FullName, "\explorer.exe", vbTextCompare) Then
- n = n + 1
- ReDim Preserve arrURL(n)
- arrURL(n) = oWin.LocationURL
- End If
- Next
- CreateObject("WScript.Shell").run "tskill explorer", 0, True
- For Each strURL In arrURL
- oShell.Explore strURL
- Next
- End Function
复制代码 参考:VBS关闭重复的文件夹窗口
http://www.bathome.net/thread-32053-1-1.html |