Jump to content
Sign in to follow this  

Closing all windows before reboot

Recommended Posts

HI first post please go easy on me if it's in the wrong place.

please be aware this refers to an NT4 workstation not an XP machine

I have scripted and install for an application which requires me to reboot and login as admin for app to finish install. to this end I wrote an additional script which auto logs the box in one time as admin the script then waits for a few minutes reboots again and user can log in normally and use the application.

My problem is that the the first rebooted is occasionaly halted by those annoying end task boxes which require interaction.

Is there a forecful way to close as windows and stop all processes to reboot cleanly.

Share this post

Link to post
Share on other sites

something like this:

$list = ProcessList()
for $i = 1 to $list[0][0]

This is closing all the processes which are running atm... so don't run it on your PC :)


[center][font="Arial"]--- The Neo and Only --- [/font][font="Arial"]--Projects---[/font]Image to Text converterText to ASCII converter[/center]

Share this post

Link to post
Share on other sites

I used Winlist from the help file and add in a line to close the windows, I don't know if it will do what you need but maybe slightly safer than closing all processes

$var = WinList()

For $i = 1 to $var[0][0]
 ; Only display visble windows that have a title
  If $var[$i][0] <> "" AND IsVisible($var[$i][1]) Then

Func IsVisible($handle)
  If BitAnd( WinGetState($handle), 2 ) Then 
    Return 1
    Return 0


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  

  • Create New...