Jump to content

Recommended Posts

Posted

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.

Posted

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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted (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 by trancexx

♡♡♡

.

eMyvnE

Posted

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.

Posted

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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

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?

Posted

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)

Posted

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?

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
  • Recently Browsing   0 members

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