jhonHills Posted September 3, 2019 Share Posted September 3, 2019 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...) Link to comment Share on other sites More sharing options...
iamtheky Posted September 3, 2019 Share Posted September 3, 2019 (edited) 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 September 3, 2019 by iamtheky jhonHills 1 ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
jhonHills Posted September 3, 2019 Author Share Posted September 3, 2019 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 More sharing options...
iamtheky Posted September 3, 2019 Share Posted September 3, 2019 (edited) 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 September 3, 2019 by iamtheky Earthshine and jhonHills 2 ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
Exit Posted September 3, 2019 Share Posted September 3, 2019 Maybe, this will help. App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted September 3, 2019 Moderators Share Posted September 3, 2019 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 More sharing options...
Moderators JLogan3o13 Posted December 28, 2019 Moderators Share Posted December 28, 2019 (edited) @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 December 28, 2019 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 More sharing options...
MattHiggs Posted January 2, 2020 Share Posted January 2, 2020 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...) 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 More sharing options...
Moderators JLogan3o13 Posted January 2, 2020 Moderators Share Posted January 2, 2020 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 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