Jump to content

Force windows to shutdown


Recommended Posts

Can windows 7 be forced to automatically shutdown/kill all programs running immediately (or preferably on a timer) instead of waiting for them to "gracefully" close? If not what's the best way to make autoit kill all programs (im not talking about my scripts) when I press the shutdown button without interrupting windows from properly shutting down important processes?

Link to comment
Share on other sites

Yeah, when you put it that way, I understand how obsered it sounds. What I mean are the programs that I as the user would have opened up that would leave the computer hanging on shutdown, force those close, and then let windows take care of the rest. Those are usually the programs and windows that hangs the OS up on shutdown.

An example would be an app that upon closing always asks if you want to save a file, that would hang up the OS on shutdown.

Edited by Champak
Link to comment
Share on other sites

Edit: or maybe you mean simply this:

Shutdown(1)

You mean this? Edit: a small debug so you don't close scite :D

Example()
Func Example()
    Local $aProcessList = ProcessList()
    For $i = 1 To $aProcessList[0][0]
   If $aProcessList[$i][0] <> "SciTE.exe" Then
    ProcessClose($aProcessList[$i][1])
   EndIf
    Next
EndFunc
Edited by AutID
Link to comment
Share on other sites

add post #6 to http://technet.microsoft.com/en-us/library/cc770300.aspx gets my vote

or a taskkill /IM /F loop through the array

Edited by boththose

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

  • 3 weeks later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...