Spined Posted September 1, 2017 Share Posted September 1, 2017 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 More sharing options...
Moderators JLogan3o13 Posted September 1, 2017 Moderators Share Posted September 1, 2017 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 Spined 1 "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 More sharing options...
careca Posted September 2, 2017 Share Posted September 2, 2017 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 More sharing options...
Spined Posted September 4, 2017 Author Share Posted September 4, 2017 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 More sharing options...
Spined Posted September 25, 2017 Author Share Posted September 25, 2017 Still need an answer. Link to comment Share on other sites More sharing options...
careca Posted September 25, 2017 Share Posted September 25, 2017 (edited) At this point only option i can think of is repeatedly send "shutdown -a" or /a Edited September 25, 2017 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 More sharing options...
Spined Posted September 25, 2017 Author Share Posted September 25, 2017 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 More sharing options...
careca Posted September 25, 2017 Share Posted September 25, 2017 What about the option in the group policy? gpedit.msc Spined 1 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 More sharing options...
Spined Posted September 25, 2017 Author Share Posted September 25, 2017 1 hour ago, careca said: What about the option in the group policy? gpedit.msc 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 More sharing options...
AdamUL Posted September 25, 2017 Share Posted September 25, 2017 Have a look at the example in the help file for_WinAPI_ShutdownBlockReasonCreate. Adam Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now