Borje Posted October 18, 2010 Share Posted October 18, 2010 Hi all Autoit freinds I need some help with a command that checks when I close the windows a program should run before windows close. I think it must be some check that detect some process and when the criteria is meet than the cleaning start before the close process continue.. Is that possible? Perhaps someone can give a example many thanks. Link to comment Share on other sites More sharing options...
water Posted October 18, 2010 Share Posted October 18, 2010 Search the forum for "windows shutdown" and you'll find a lot of entries.One way ist to change the group policy as described in this post. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Varian Posted October 18, 2010 Share Posted October 18, 2010 FileWare has a free utility called LastChance that intercepts after the user has seleceted shutdown/reboot/logoff and runs whatever program you select. Link to comment Share on other sites More sharing options...
trancexx Posted October 18, 2010 Share Posted October 18, 2010 (edited) Just register WM_ENDSESSION message. There are plenty of examples around.edit:Just as a side note, we are on programming forum. We should share code, not utilities or whatever. Edited October 18, 2010 by trancexx ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
JoHanatCent Posted October 19, 2010 Share Posted October 19, 2010 Just intersept the "Shut Down Window" with your own version? WinActive. Link to comment Share on other sites More sharing options...
Borje Posted October 20, 2010 Author Share Posted October 20, 2010 Thanks all for the tips... I am not so shure what i must do I am not so familiar with WM_ENDSESSION command perhaps someone have som idea.. I want to have a function that check if I press the close button or shutdown(5) then hook the close process and run my backup and then continue the close process. Link to comment Share on other sites More sharing options...
water Posted October 20, 2010 Share Posted October 20, 2010 Search the forum for WM_ENDSESSION (as I've done) and you'll find examples like this. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Borje Posted October 21, 2010 Author Share Posted October 21, 2010 I have test that exaple that water link to but the only way to have that to work is when the window logout or restart or close is visible but not if I send a command shutdown(5) from a script, is that possible to do that? Link to comment Share on other sites More sharing options...
Borje Posted October 22, 2010 Author Share Posted October 22, 2010 Is there anybody here that have some tips what to do i have test some examples but can not figure it out how to detect the shutdown(5), in the close window that works but not when i send shutdown(5) Link to comment Share on other sites More sharing options...
trancexx Posted October 22, 2010 Share Posted October 22, 2010 Is it possible that you still haven't figured out what's expected of you? ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Borje Posted October 22, 2010 Author Share Posted October 22, 2010 I have test the example that water link to, and thats works if a press the button start and then go to close but if I do a little script with command shutdown(5) an running that not working, so my question is are that possible to do something to have that working too? Link to comment Share on other sites More sharing options...
trancexx Posted October 22, 2010 Share Posted October 22, 2010 And you think that's it? ...ahhh ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Borje Posted October 24, 2010 Author Share Posted October 24, 2010 Nowbody know ? 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