Stopping Software Center from restarting your computer

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…)

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 :-)

This entry was posted in Tips and tagged , , , , , . Bookmark the permalink.

6 Responses to Stopping Software Center from restarting your computer

  1. James Rinehart says:

    This is the greatest information that I have ever received!

  2. Kakarr0t says:

    are there any instructions on how to actually copy/paste/run the powershell commands to close the annoying software center window? I’m getting an error when I copy and paste each line.

    PS H:\> $form = Get-Process |where {$_.mainWindowTItle -like “*Software Cen
    PS H:\> $setPOS = @’
    >> [DllImport(“user32.dll”)]
    >> public static extern bool SetWindowPos(IntPtr hWnd,
    >> IntPtr hWndInsertAfter,
    >> int X,
    >> int Y,
    >> int cx,
    >> int cy,
    >> uint uFlags);
    >> ‘@
    PS H:\> $handle = $form.MainWindowHandle
    PS H:\> $SetWindowPos = Add-Type -MemberDefinition $setPOS -name WinApiCall
    PS H:\> $SetWindowPos::SetWindowPos($handle,-1,0,0,0,0,0×0080) # 0x0080 = S
    Cannot convert argument “hWnd”, with value: “System.Object[]”, for “SetWind
    convert the “System.Object[]” value of type “System.Object[]” to type “Syst
    At line:1 char:1
    + $SetWindowPos::SetWindowPos($handle,-1,0,0,0,0,0×0080) # 0x0080 = SWP …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodArgumentConversionInvalidCastArgument

    • Dan says:

      I was able to copy the text in the article above, and simply paste it into the PowerShell console and run successfully. If it does not work, could try to use PowerShell ISE instead. Paste the text into the editor and press F5 to run. ISE is better at handling copy/paste in my experience.

  3. Shashank Badola says:

    Very useful information. I used it when my machine was about to shut down and my scanner was scanning machines since last 2 days to reach 98%. If my machine would get restarted at that time then whole 2 days efforts would be wasted. Thanks for sharing this information.

  4. Tom says:

    To get rid of the popup window just kill the scnotification.exe process.

Leave a Reply

Your email address will not be published. Required fields are marked *