Spined

Cancel Windows Shutdown

10 posts in this topic

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

Share this post


Link to post
Share on other sites



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

 

1 person likes this

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
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

Paster - Main function is to paste text, but has more functions.

OpenW - Open With... alternative, Open any file with any application, set it's icon, set application as default.

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

BeatsPlayer - Music player.

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

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.

Firefox Profile Backup - Backup/restore previously saved profile.

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

Share this post


Link to post
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...

Share this post


Link to post
Share on other sites

Still need an answer. 

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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

Edited by careca

Spoiler

Paster - Main function is to paste text, but has more functions.

OpenW - Open With... alternative, Open any file with any application, set it's icon, set application as default.

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

BeatsPlayer - Music player.

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

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.

Firefox Profile Backup - Backup/restore previously saved profile.

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

Share this post


Link to post
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 ? 

Share this post


Link to post
Share on other sites

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

 

Capture.PNG

1 person likes this

Spoiler

Paster - Main function is to paste text, but has more functions.

OpenW - Open With... alternative, Open any file with any application, set it's icon, set application as default.

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

BeatsPlayer - Music player.

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

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.

Firefox Profile Backup - Backup/restore previously saved profile.

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

Share this post


Link to post
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

Share this post


Link to post
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