Luis Diaz
asked on
AutoHotkey: close all active windows explorer
Hello experts,
I am looking for an AutoHotkey that allows me to close all windows explorer windows (active, and minimized one's).
If you have advice on this please let me know.
Thank you for your help.
I am looking for an AutoHotkey that allows me to close all windows explorer windows (active, and minimized one's).
If you have advice on this please let me know.
Thank you for your help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi Sam,
I know very little about PowerShell. What in that code tells it to close (Quit) only Windows/File Explorer windows? The only things that I can see in the code that might do it (again, knowing little about PowerShell) are the .Windows and Shell.Application references, but I presume that would catch more than just Windows/File Explorer. What's the scoop? Thanks, Joe
I know very little about PowerShell. What in that code tells it to close (Quit) only Windows/File Explorer windows? The only things that I can see in the code that might do it (again, knowing little about PowerShell) are the .Windows and Shell.Application references, but I presume that would catch more than just Windows/File Explorer. What's the scoop? Thanks, Joe
ASKER
Thank you Joe, I tested and it works!
Glad to hear it, Luis, thanks for letting me know. Regards, Joe
Hi Joe,
My apologies ... you are absolutely correct ... the snippet should include a test for Windows Explorer:
Sam
My apologies ... you are absolutely correct ... the snippet should include a test for Windows Explorer:
$app = New-Object -COM 'Shell.Application'
$app.Windows() | foreach { if ($_.FullName -match ('EXPLORER.EXE$')) { $_.Quit() } }
Thanks,Sam
Thanks for the update, Sam...much appreciated! Regards, Joe
Open in new window