Jump to content

How to cancel windows update reboot?


jhonHills
 Share

Recommended Posts

Hi, first day learning autoit and need some help get started with it

I have couple Windows  computers where I run a patch every 1st Monday of month. Basically user whoever is using these computer gets a following message: (see attached image)

I want to give user the ability to cancel/abort this restart due to reasons such as user is on a important conference meeting. 

How does autoit knows that this restart popup window is open? bc I was thinking to just create 2nd popup on top that has a cancel'abort button. msgbox() / run(... shutdown -a...)

 

 

Untitled.thumb.png.2cf0c2d604058d60e61e1437e1d7b109.png

 

 

 

 

 

Link to comment
Share on other sites

Shutdown -a kills a pending reboot, it does not reset the timer for a system center update.  I would guess your solution lies not with AutoIt, but with the System Center configurations to allow your clients to 'snooze'.

https://docs.microsoft.com/en-us/sccm/core/clients/deploy/device-restart-notifications

**while you can certainly automate the internet suggestion of killing SCNotification and pausing ccmexec, that requires admin level rights in user-land and a metric shit-ton more effort than just making the SCCM change.

Edited by iamtheky

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

8 hours ago, iamtheky said:

Shutdown -a kills a pending reboot, it does not reset the timer for a system center update.  I would guess your solution lies not with AutoIt, but with the System Center configurations to allow your clients to 'snooze'.

https://docs.microsoft.com/en-us/sccm/core/clients/deploy/device-restart-notifications

**while you can certainly automate the internet suggestion of killing SCNotification and pausing ccmexec, that requires admin level rights in user-land and a metric shit-ton more effort than just making the SCCM change.

 

Thanks this helps alot. Again my background is in web developer and I am new to this kind of stuff with Windows

So look like users are missing the temporany notification popup window with [Restart | Snooze] buttons on Monday bc their laptop is shut off.

whenever they turn on their labtops for conferencence meeting, lets say Wednesday... they are getting the final count down popup window with [restart | hide] buttons. 

Do you know how can I change [Hide] Button to [snooze] button? I guess setting is in 'Software Center', asuming its still possiable.

Link to comment
Share on other sites

I do not, we do however have some folk who have explored its depths like @JLogan3o13.  You might get lucky since i tagged him, but better off making a new topic  (or changing the title of this one) with keywords in the subject like "Modify controls/behavior of the SCCM update dialog" so you attract those people.

Edited by iamtheky

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

  • Moderators

Whether you see Snooze or Hide depends on where in the reboot cycle the client is, which is configured in the Computer Restart Client Settings page in System Center. You have the following notification options:

  • Display a dialog box that the user cannot close, which displays the countdown interval before the user is logged off or the computer restarts (minutes) - This is the "always in your face" option...
  • Display a temporary notification to the user that indicates the interval before the user is logged off or the computer restarts (minutes) - This is more of a pop-up with a snooze option, either a dialogue box or a toast message (configurable in Client Settings page)

In either case, you're not snoozing the reboot so much as the notification itself. If you set the pop up notification max duration for 1440 minutes (24 hours) for example, and you leave your max snooze duration at the default of 240 minutes, then you will see the snooze button up until (max notification duration - max snooze duration) is less than 240 minutes. Then you will only get the hide button. As these max values are set globally in System Center, there is really no way to configure a one-off for a single user who is in a meeting or otherwise needs to avoid the reboot.

If this is an issue, I would suggest that you (or your System Center admin) take a look at these values to see if they are timing out during a window where people are still trying to work, and adjusting them accordingly. If, as you mentioned above, it is users "missing" the notification, then I would look into how it is configured. I can see if they are missing the little toast message (down in the taskbar bu the clock); you may want to look into the full blown pop up dialogue. I would suggest staying away from the first bullet point above, however - most customers in my experience get very negative feedback going this route.

Hope this helps.

"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

  • 3 months later...
  • Moderators

@aniyamay You are mistaken; SCCM will happily reboot the machine whether you are logged in or not. That is the whole point of the application.

Edited by JLogan3o13

"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

On 9/2/2019 at 11:41 PM, jhonHills said:

Hi, first day learning autoit and need some help get started with it

I have couple Windows  computers where I run a patch every 1st Monday of month. Basically user whoever is using these computer gets a following message: (see attached image)

I want to give user the ability to cancel/abort this restart due to reasons such as user is on a important conference meeting. 

How does autoit knows that this restart popup window is open? bc I was thinking to just create 2nd popup on top that has a cancel'abort button. msgbox() / run(... shutdown -a...)

 

 

Untitled.thumb.png.2cf0c2d604058d60e61e1437e1d7b109.png

 

 

 

 

 

Turn off the Windows update service.  The countdown will not stop, but the reboot will not occur when the countdown reaches 0.  Press and hold windows key and press "R", type "services.msc" into box, scroll to windows update service, right click, and "stop" it

Link to comment
Share on other sites

  • Moderators

Breaking the Windows Update Service is then going to cause the agent to fail, which will be reported to SCCM and cause those machines to be out of compliance as far as any SCCM reporting goes. Depending on how reporting of issues is set up, this could result in multiple emails/pages to the team that owns SCCM. Not what I would call a best practice. 

"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

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