Champak Posted March 31, 2014 Share Posted March 31, 2014 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 More sharing options...
JohnOne Posted March 31, 2014 Share Posted March 31, 2014 You want to ungracefully shut down windows without interrupting it's graceful shutdown? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Champak Posted March 31, 2014 Author Share Posted March 31, 2014 (edited) 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 March 31, 2014 by Champak Link to comment Share on other sites More sharing options...
JohnOne Posted March 31, 2014 Share Posted March 31, 2014 HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControl WaitToKillServiceTimeout AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
JohnOne Posted March 31, 2014 Share Posted March 31, 2014 (edited) Or HKEY_CURRENT_USERControl PanelDesktop WaitToKillAppTimeout If it's not there you can add it. EDIT: Or AutoEndTasks Under the same key. Edited March 31, 2014 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
AutID Posted March 31, 2014 Share Posted March 31, 2014 (edited) Edit: or maybe you mean simply this: Shutdown(1) You mean this? Edit: a small debug so you don't close scite 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 March 31, 2014 by AutID https://iblockify.wordpress.com/ Link to comment Share on other sites More sharing options...
PACaleala Posted March 31, 2014 Share Posted March 31, 2014 Microsoft Windows [Version 6.1.7601] F:>shutdown /? Link to comment Share on other sites More sharing options...
iamtheky Posted March 31, 2014 Share Posted March 31, 2014 (edited) 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 March 31, 2014 by boththose ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
MyDream Posted April 16, 2014 Share Posted April 16, 2014 Well, I was looking for a similar solution to that and I found KaFu post in this thread(first example code). Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now