Jump to content

Cancel Windows Shutdown


Spined
 Share

Recommended Posts

I am pretty new to AutoIt, so don't blame me if it's something very easy everybody should know...

I want that my script cancels all shutdowns and makes it impossible to shutdown. Its for a back-up program.

I've already seen some programs that use the Windows 10 Update screen for their use. It would be awesome if there was any possibility where i could create my own "update screen". For all those who don't know which update screen I mean: I am talking about the one that appears after you press "shut down" and windows starts to install the updates. 

And I know how to make the program "prevent" the shutdown, but you can still press "shut down anyway", and i don't event want this screen to appear.

 

Thank you for helping !!!

Link to comment
Share on other sites

  • Moderators

Moved to the appropriate forum, as the DEV forum clearly states:

Quote

Do not create AutoIt-related topics here, use AutoIt General Help and Support

 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Well, what about keeping a loop trying to detect the window you mentioned, and close it as soon as it appears? It'd be very fast, not enough time for anyone to click on it.

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

On 2.9.2017 at 4:18 AM, careca said:

Well, what about keeping a loop trying to detect the window you mentioned, and close it as soon as it appears? It'd be very fast, not enough time for anyone to click on it.

The problem is, that Windows 10 blocks all Programs as soon as it gets to the "Shutdown Anyway" screen. So i have to block the shutdown before...

Link to comment
Share on other sites

  • 3 weeks later...

At this point only option i can think of is repeatedly send
"shutdown -a" or /a

Edited by careca
Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

12 minutes ago, careca said:

At this point only option i can think of is repeatedly send
"shutdown -a" or /a

doesn't work, because you can't use it when the pc is already shutting down. And you can't cancel it when the user initiates the shutdown via the shutdown button...

There has to be a way to solve this... maybe with DLLs ? 

 

I want to cancel the shutdown, then let my program backup some files and then continue the shutdown.

How can i access the maintenance mode in windows ? 

Link to comment
Share on other sites

What about the option in the group policy? gpedit.msc

 

Capture.PNG

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

1 hour ago, careca said:

What about the option in the group policy? gpedit.msc

 

Capture.PNG

It looks very promising to me, but unfortunately I only have Win10 Home on my Laptop. But I am definetly going to try this out when I am at home with my Win10 Pro Computer. gpedit.msc is only available for Win7/8/10 Pro... 

I'll give a update if it works

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