IT-departments may require you to restart your computer to complete updates they have pushed out. This is at best annoying, at worst it can ruin your work if you for example have a long running process in progress. (My personal favorite is when the company forced me to restart my computer in the middle of a service window when I was upgrading a system for said company…)
Note: Skip to Update 2 at the bottom for the latest working method!
If your company uses System Center you may recognize the following dialog informing you that Your Computer is About to Restart:

You can’t close this window or ask it to stop the shut down. So what can you do? I’ve seen others talk about shutting down Windows Services. That never worked for me, but I discovered that there was an easy way to stop the process. Simply open a command prompt and type
shutdown /a

This will abort the shutdown:

The countdown window will still be open, but when reaching zero nothing will happen!

Now you can finish your work at your own pace, before restarting your computer.
Note: If it does not work and you get a message that there is no shutdown in progress, try again later. I’m guessing that the shutdown command is not issued until 15-30 minutes before it should go off. Let me know in the comments if it works.
Update: Since the update window is “always on top” and can’t be closed it blocks your view in a pretty annoying way. Luckily we can use a bit of PowerShell and WinAPI to to hack the window properties to hide it :-)
|
|
$form = Get-Process |where {$_.mainWindowTItle -like "*Software Center*"} $setPOS = @' [DllImport("user32.dll")] public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags); '@ $handle = $form.MainWindowHandle $SetWindowPos = Add-Type -MemberDefinition $setPOS -name WinApiCall -passthru $SetWindowPos::SetWindowPos($handle,-1,0,0,0,0,0x0080) # 0x0080 = SWP_HIDEWINDOW |
Update 2: Above does not work for me anymore. But I found that you can simply stop the service:
- Open Services (run -> services.msc)
- Find “SMS Agent Host”
- Open it and click “Stop”
Also run
shutdown -a to make sure your computer does not restart itself.
The shutdown notification should go away. It might return after a while, but you repeat the steps above over and over.