Jump to content
Sign in to follow this  
Champak

Force windows to shutdown

Recommended Posts

Champak

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?

Share this post


Link to post
Share on other sites
Champak

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

Share this post


Link to post
Share on other sites
AutID

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

Share this post


Link to post
Share on other sites
PACaleala

Microsoft Windows [Version 6.1.7601]

F:>shutdown /?

Share this post


Link to post
Share on other sites
iamtheky

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

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

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.