Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Close all windows script

Featured Replies

Thanks to a geek named Rischip on VBS forum

This script requires MS Word.

I think it can work on every windows.

Copy paste the code below into notepad and save it under Close_all_windows.vbs

'Author Rischip
'Home page [link=http://www.thegrimlinker.com]www.thegrimlinker.com[/link]
'This script closes all open windows on the workstation
'The script does not forcefully close applications
'therefore you will get a Save dialog on text editor apps and the like
'before they close
'This script requires Microsoft Word to be installed on your computer

On Error Resume Next

'check to ensure running under wscript
'if we are not it would be possible
'for the script to kill itself in the
'command window that cscript would have open
'if we are cool, if not relaunch under wscript

If Not LCase(Right(Wscript.FullName, 11)) = "wscript.exe" Then
Set objShell = CreateObject("Wscript.Shell")
objShell.Run "Wscript.exe " & WScript.ScriptFullName , 0, False
WScript.quit
End If

'create Word object
Set objWord = CreateObject("Word.Application")
'get collection of open windows
Set colTasks = objWord.Tasks
'enumerate open windows
'checking for visibility
'verify task is not program manager
'otherwise you will get the logoff/shutdown/restart window

for each objTask in colTasks
If objTask.Visible Then
If Not objTask.Name = "Program Manager" then
colTasks(objTask.Name).Close
End If
End If

next

objWord.Quit


I use Closing Time...

Works great... :)

"Closing Time is a simple little program you can use to close open windows. It can close hidden windows as well as windows that don't have title bar."

Closing Time v2.10

  • 4 weeks later...

Hey, who are you calling Geek....... LMAO

At least spell my name correctly......

Thank You.

This script actually closes windows in a "nice" way as well. If you've made edits to a document for instance. If the program offers the automated notification that the file has changed and to save it. You will get that prompt.

I use this script to close all windows "but", example: you can include the title "Inbox - Microsoft Outlook"

and if you are in Outlook on the Inbox page, it will not be closed. You can add any window title you wish.

Rischip

  • 3 years later...

Folks,

I love this script!

Is there any way i can adapt this to "Windows 7"? I run it and it closes everything but also tries to log off of windows. I added a wscript.echo

for objTask.Name to see what was going on and it was saying "Program Manager" and then it said "Start". I tried getting it to ignore program manager and start, but it keeps trying to close those. processes. I'd love any help you can give me on this.

Thanks,

Randy

for each objTask in colTasks

If objTask.Visible Then

If Not objTask.Name = "Program Manager" then

wscript.echo objtask.name

colTasks(objTask.Name).Close

End If

End If

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.