Jump to content

Run a program before windows close


Borje
 Share

Recommended Posts

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

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 - 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 (NEW 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

 

Link to comment
Share on other sites

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

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 - 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 (NEW 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

 

Link to comment
Share on other sites

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

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

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...