Jump to content

Recommended Posts

Posted

hello,

I have a script that I would not like to close before the end of its execution. If the user decides to close Windows I would like to prevent the shutdown of Windows.
For that I found several examples on this forum for example this one:

Blocking works well with just a While Loop execution.
But if we add other autoit commands (run, inetget ...), the script is closed on closing Windows after a few seconds.

Do you have any solution to prevent closing.

Thank you.

  • Developers
Posted
  On 11/22/2017 at 8:13 PM, Earthshine said:

this sounds like evil doings going on.

Expand  

Isn't that statement somewhat judgmental and shouldn't that be: Why would you want to do this?

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted
  On 11/22/2017 at 9:02 AM, czmaster said:

Blocking works well with just a While Loop execution.

Expand  

Fileinstall a second .exe doing just that, run it in the background as a helper process and kill it when main process is done?

Posted (edited)
  On 11/22/2017 at 8:12 PM, JohnOne said:

You want to prevent a user from shutting their own device down?

Expand  

 

  On 11/22/2017 at 8:13 PM, Earthshine said:

this sounds like evil doings going on.

Expand  

Even with the method that works the user can allways force the shutdown in Windows, this is equivalent to an unsaved modified file that prevents Windows from closing.

  On 11/22/2017 at 8:20 PM, Jos said:

Isn't that statement somewhat judgmental and shouldn't that be: Why would you want to do this?

Jos

Expand  

Any kind of action that will take some time : backup, antivirus and personal script.

Edited by czmaster
Posted

Nothing can prevent shutdown for one reason - The user can cut the power to the computer. 

If you are trying to push a package to the PC - it would be best to have the package install in the background while the user is using the computer. There are many resources that explain how to do  it. Google is your friend. 

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