Close all open windows with one click.

Page 5 of 5 FirstFirst ... 345
  1. theoldfarter's Avatar
    Posts : 141
    Windows 10 Home
    Thread Starter
       #41

    KeithM said:
    PowerShell to close all Explorer windows:

    (New-Object -ComObject shell.application).windows() | %{$_.quit()}

    can be appended to Kari's command with a semicolon:

    "Get-Process | Where-Object {$_.MainWindowTitle -ne ''} | stop-process; (New-Object -ComObject shell.application).windows() | %{$_.quit()}"

    Keith
    I get an error message when I cut & paste your command.

    Close all open windows with one click.-capture.png
      My Computer

  2. theoldfarter's Avatar
    Posts : 141
    Windows 10 Home
    Thread Starter
       #42

    f14tomcat said:
    Sounds like to need to set the Start Menu to Full Screen for this One-Key option to fully cover the screen display.

    This is not a 3rd party option. It is pure native Windows, already built in with nothing more you need to create.

    I noticed in one of your previous posts you did not want to see the Task Bar. An advantage to keeping the Task Bar visible, in your situation, is you can right-click any of the app/browser/explorer icons showing and close the app/browser/explorer window from there. Without opening them back up and showing the contents. May be handy for your purpose.

    To set the Start Menu full screen (covers everything):


    Attachment 215496

    Indeed, that got it to full screen. I now have two options I can use, both with just one key press. Thanks.
      My Computer

  3. KeithM's Avatar
    Posts : 806
    Microsoft Windows 10 Home
       #43

    theoldfarter said:
    I get an error message when I cut & paste your command.

    Close all open windows with one click.-capture.png
    You still need the call to PowerShell, I was just showing edited parameter.

    The full shortcut target would be:

    Edit: works better closing Explorer windows first.

    PowerShell -command "(New-Object -ComObject shell.application).windows() | %{$_.quit()}; Get-Process | Where-Object {$_.MainWindowTitle -ne ''} | stop-process"

    Keith
    Last edited by KeithM; 28 Nov 2018 at 14:30. Reason: update
      My Computer

  4. theoldfarter's Avatar
    Posts : 141
    Windows 10 Home
    Thread Starter
       #44

    It now works Keith. I was just pasting all within the " ". Once I realized I needed to include PowerShell - command as well, it worked.
    I will now mark this thread as Solved. Thank you all who contributed, I am most grateful.
      My Computer

  5. f14tomcat's Avatar
    Posts : 53,243
    Multi-boot Windows 10 - RTM, RP, Beta, and Insider
       #45

    theoldfarter said:
    Indeed, that got it to full screen. I now have two options I can use, both with just one key press. Thanks.
    Late getting back...good, now you look set.
      My Computers


 
Page 5 of 5 FirstFirst ... 345

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 21:47.
Find Us




Windows 10 Forums