Re: closing all application windows
- From: "mayayana" <mayaXXyana1a@xxxxxxxxxxxxxxxx>
- Date: Mon, 01 Aug 2005 13:55:56 GMT
> I've tried several times to register the JSSys3.dll or the and it keeps
> failing, accompanied by some incomprehensible information about the
> error. I never saw a program that doesn't just include its own
> installation procedure and that makes installation so difficult.
>
I'm afraid you might have to read the directions. :)
(JSSys3 Info.txt has a full explanation of how to register
and use the component.)
JSSys3 is not a program, and it's not designed for
"regular users". JSSys3 is just a tool - a free component
that provides scripters with access to Windows API
functionality - the built-in Windows system functions.
If you want a program to close all windows then I imagine
you might have more luck on a sys.admin. newsgroup or
by searching at Google.
If you really want to use VBScript to do the task then you
have to know what you're doing because there's no built-in
protection like you'd get with a program. And using API
options through script is stretching script beyond what it was
meant to do. As I wrote in the prior post, and as you found in
your tests with other components, closing all windows is tricky.
In other words, you asked for a pan to bake a cake
from scratch. Now that you have the pan, you have
to know how to bake your cake. If what you really wanted
was to get a cake by pressing a button on the microwave,
then the pan won't do you any good. You'll need to get a
microwavable instant cake mix.
>
> Larry wrote:
> > I downloaded JSSys3 but this is not something designed for the regular
> > user. The Help is terrible, and you have to follow complicated
> > instructions to set it up, and setup requires further files on the
> > computer which apparently are not included in the download.
> >
> >
> >
> >
> > mayayana wrote:
> > > > Thanks. Unfortunately, I can't use Cmdow as I have Windows 98.
> > > >
> > > > As for the other utilities you suggested, I don't need a list to
> > > > appear, I just want to close all open windows, with the option of
> > > > excluding some items
> > > >
> > > Don't you need the list to exclude some items?
> > > JSSys3 will get the list of open windows and you
> > > can pick which things to close from that. It also
> > > has a function to close the windows.
> > >
> > > > > > I've tried a couple of freeware utilities but
> > > > > > one of them caused Windows to crash, and the other doesn't
> > > > > > have the ability to exclude certain programs from the close
> > > > > > down.
> > >
> > > The whole idea is somewhat iffy because it won't always
> > > work with all windows, as you found. The JSSys3 function
> > > to close a window has two options. The first is the equivalant
> > > of clicking the upper-right "X" button. The second option, more
> > > forceful, sends a message telling the program to "clean up
> > > now, you're being closed". (WM_CLOSE and WM_QUIT
> > > system messages, respectively.) But some programs do not
> > > listen to those messages and some may be granted higher
> > > status by Windows. (For example, you may find that IE does
> > > not behave properly.) Those messages are only obeyed by
> > > polite, well-behaved software that was designed to pick
> > > up the messages and respond to them.
> > > There is a third, more forceful option to force-close a program,
> > > which just kills the process, but it was not included in JSSys3
> > > because it doesn't give the program any chance to clean up,
> > > release memory in use, etc. It's really only for things like
> > > running viruses and frozen programs. (That's why Task Manager
> > > sometimes fails to close a program and then comes back a
> > > few seconds later with a message, "This program is not
> > > responding. Do you want to....?" )
> > >
> > >
> > >
> > > > Larry
> > > >
> > > >
> > > >
> > > > Torgeir Bakken (MVP) wrote:
> > > > > Larry wrote:
> > > > >
> > > > > > Do you think it would be possible to create a .vbs file with
> > > > > > Windows script (or maybe AutoIt) that would close all open
> > > > > > application windows in one step? I've tried a couple of
> > > > > > freeware utilities but one of them caused Windows to crash,
> > > > > > and the other doesn't have the ability to exclude certain
> > > > > > programs from the close down.
> > > > > >
> > > > > Hi,
> > > > >
> > > > > Some solutions that will make a list of all windows that are
> > > > > shown on the taskbar, and then you need to add the logic for the
> > > > > excluding part:
> > > > >
> > > > > AxtiveX solution:
> > > > >
> > > > > Register JSSys3.dll (free) with regsvr32.exe on your computer:
> > > > >
> > > > > The GetOpenWindowTitles function in JSSys3.dll
> > > > > http://www.jsware.net/jsware/scripts.html#jssys
> > > > >
> > > > >
> > > > > Here is two free command line utilities you can e.g. run from a
> > > > > network share, nothing needs to be installed on the local
> > > > > computer if you don't want to. You can e.g. redirect the output
> > > > > to a temporary file and parse it from your vbscript.
> > > > >
> > > > > Enum.exe in the Command Line Tools (CMDLINE.ZIP), lists all
> > > > > visible top-level windows
> > > > > http://www.cmdtools.com/
> > > > >
> > > > > CMDOW Commandline Window Utility (with /T: List only the windows
> > > > > shown on the taskbar, /CLS or /END will close or teminate the
> > > > > window) http://www.commandline.co.uk/cmdow/index.html
> > > > >
> > > > >
> > > > > And from a previous post by me about using Cmdow.exe to close
> > > > > all windows from a script:
> > > > >
> > > > > From: "Torgeir Bakken \(MVP\)" <Torgeir.Bakken-s...@xxxxxxxxx>
> > > > > Date: Wed, 13 Oct 2004 16:35:00 +0200
> > > > > Subject: Re: Close all Windows
> > > > > Newsgroups: microsoft.public.scripting.vbscript
> > > > >
> > > > > <quote>
> > > > >
> > > > > Craig Thomas wrote:
> > > > >
> > > > > > In VBScript, I need to Close ALL Windows open. I need to do
> > > > > this so > I can install some patches, and I need to make sure
> > > > > everything is > closed. Any help would greatly be appreciated.
> > > > > Hi
> > > > >
> > > > > The free Cmdow.exe is an option:
> > > > >
> > > > > http://www.commandline.co.uk/cmdow/index.html
> > > > >
> > > > > Using the switch /CLS, it will close the windows (end user will
> > > > > be asked to save unsaved data if any exists).
> > > > >
> > > > > Using the switch /END, it will terminate the windows (without
> > > > > the option for user to save unsaved data).
> > > > >
> > > > >
> > > > > Below is an VBScript example using cmdow.exe to minimize all
> > > > > windows. Substitute /min with /cls or /end to close/terminate
> > > > > all windows.
> > > > >
> > > > >
> > > > > '--------------------8<----------------------
> > > > > ' path to the CMDOW Commandline Window Utility
> > > > > ' found at http://www.commandline.co.uk/cmdow/index.html
> > > > > sCmdowPath = "C:\tools\cmdow\cmdow.exe"
> > > > >
> > > > > Set oShell = CreateObject("Wscript.Shell")
> > > > >
> > > > > sCmd = "%comspec% /c for /f %a in ('""" & sCmdowPath & """ /t')
> > > > > do """ _ & sCmdowPath & """ %a /min"
> > > > >
> > > > > oShell.Run sCmd, 0, True
> > > > >
> > > > > ' continue with the rest of the script here
> > > > >
> > > > > '--------------------8<----------------------
> > > > >
> > > > > </quote>
>
>
.
- References:
- closing all application windows
- From: Larry
- Re: closing all application windows
- From: Torgeir Bakken \(MVP\)
- Re: closing all application windows
- From: Larry
- Re: closing all application windows
- From: mayayana
- Re: closing all application windows
- From: Larry
- Re: closing all application windows
- From: Larry
- closing all application windows
- Prev by Date: Re: Error: Object not a collection?
- Next by Date: Safety Remove Hardware
- Previous by thread: Re: closing all application windows
- Next by thread: Re: closing all application windows
- Index(es):
Relevant Pages
|