Sign in to follow this  
Followers 0
BigDaddyO

Close All Window Issue

3 posts in this topic

I got some help from some people on this site a while ago with how to close all open windows. The following code was given to me and it works great, But on some computers it will bring up the Shutdown windows screen, then close it, then bring it back up and get stuck in this loop. Any ideas?

Send("!+{Tab}");Alt+Tab switches to the next active window

While Not WinActive("classname=Progman");Program Manager is the Desktop
  WinKill("");kills the active window
  WinClose("");Because WinKill might not work on Explorer windows
  Send("!+{Tab}")
  sleep(100);pause a few milliseconds
WEnd

Share this post


Link to post
Share on other sites



Are the machines it tries to shut down Windows 9x machines? Is Progman the classname of the the desktop itself on 9x (It is on 2000/XP). Killing off the explorer process (Or Desktop window) on Windows 9x will try to shut the computer down.

Share this post


Link to post
Share on other sites

I only run the script on 2000/XP machines. The problem will occur on either a 2000 or XP but not on every computer, just some...


Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0