How to fix "Program Manager" preventing shut down

Discussion in 'Windows 10' started by Super Spartan, Mar 23, 2016.

  1. Super Spartan

    Super Spartan MDL Expert

    May 30, 2014
    1,709
    990
    60
    Even on a clean install of Windows 10 latest build with nothing installed not even drivers, when I reboot, I always see this message for a few seconds "Program Manager is preventing Windows from....."

    I can either wait for a few seconds for the reboot to happen or manually click restart now

    how can I stop this nuisance? I want an instant restart / shutdown

    I have Fast Startup turned off and hibernation file disabled ( powercfg -h off )
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Super Spartan

    Super Spartan MDL Expert

    May 30, 2014
    1,709
    990
    60
    #2 Super Spartan, Mar 23, 2016
    Last edited: Mar 24, 2016
    (OP)
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. dmex

    dmex MDL Junior Member

    Apr 20, 2011
    95
    105
    0
    "Program Manager" is the window class name used by Windows Explorer.

    It's a good idea to not rush into system optimization right after a fresh install, there are a lot of processes doing their first-time initialization tasks such as running the Store application updater, Windows update installer, Indexing service, ShellExperienceHost ("Distributed Link Tracking" by the start-menu), CLR native image generation and about 10 other processes either installing updates or setting up, some of them can take a few hours to finish (they run with very low priority or when the machine is idle).

    The reason why you're seeing that message is because the shutdown/reboot dialog is waiting for those other processes to shut down but the only one with any visible windows is Explorer (that dialog only shows the names of visible windows and not actual processes) and because those other processes (without any visible windows) are taking longer than 3 seconds, it trips the dialog and ends up only showing the "Program Manager" window from the Explorer process.

    All that does is force the termination of those other processes before they have enough time to shut down properly and might cause corruption. You should probably change it back, once those initial setup tasks have completed (and your new installation is more than a few hours old) it won't be an issue. ;)
     
  4. LiteOS

    LiteOS Windowizer

    Mar 7, 2014
    2,209
    984
    90
    Try block the internet for it
     
  5. endbase

    endbase MDL Guru

    Aug 12, 2012
    4,674
    1,710
    150
    At my reboot or shutdown Origin holds up the process I can't block that I need that for playing Need For Speed 2016 :D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. LiteOS

    LiteOS Windowizer

    Mar 7, 2014
    2,209
    984
    90
    i mean explorer.exe it might not block correctly
    block everything with wfc and just allow the applications or games that need net
     
  7. Super Spartan

    Super Spartan MDL Expert

    May 30, 2014
    1,709
    990
    60
    nevermind, I spoke too soon, that reg entry to Auto End Tasks did not get rid of the program manager is preventing Windows from Shutting Down.

    I don't remember if I saw this with the first bulid of Windows 10 10240
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. TairikuOkami

    TairikuOkami MDL Expert

    Mar 15, 2014
    1,172
    1,055
    60
    Have you added other entries as well, esecialy the one related to killing the service?

    reg add "HKCU\Control Panel\Desktop" /v "AutoEndTasks" /t REG_SZ /d 1 /f
    reg add "HKCU\Control Panel\Desktop" /v "HungAppTimeout" /t REG_SZ /d "5000" /f
    reg add "HKCU\Control Panel\Desktop" /v "WaitToKillAppTimeout" /t REG_SZ /d "10000" /f
    reg add "HKLM\System\CurrentControlSet\Control" /v "WaitToKillServiceTimeout" /t REG_SZ /d "10000" /f
     
  9. WaltC

    WaltC MDL Addicted

    Mar 8, 2014
    518
    123
    30
    Bear in mind that just because you see that text displayed, that's no reason to think the delay actually has anything to do with shutting down running programs...;) It could easily be a common Windows shutdown problem--you might wish to Bing/Google "Windows 10 won't shut down" or something similar and start reading up on it. On build 14291 I see a shutdown/reboot delay related to closing running applications, but the duration is only 1-2 seconds at most. You can try shutting your programs down one at a time from the systray or the task manager to see if there's one you're running which takes a while to shut down, etc.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. antonio8909

    antonio8909 MDL Guru

    Feb 16, 2014
    3,111
    1,516
    120
    Hello. Sorry for bumping this post 4 years later... I'm facing this problem in 20H2 and I don't know how can I fix it. Does this fix still work? It won't corrupt any program, right?

    Thanks!
     
  11. Javac75

    Javac75 MDL Junior Member

    Mar 16, 2015
    89
    63
    0
    I'm facing that too at time sync task when restart/shutdown, and the fix can handle it without corrupting anything.
     
  12. antonio8909

    antonio8909 MDL Guru

    Feb 16, 2014
    3,111
    1,516
    120
    Program Manager dissapeared but now another process called "Task Killer" or something like that prevents Windows from shutting down...
    Thanks
     
  13. Javac75

    Javac75 MDL Junior Member

    Mar 16, 2015
    89
    63
    0
    #13 Javac75, Dec 3, 2020
    Last edited: Dec 3, 2020
    Perhaps, you should try to reduce the timeout.
    Personally, i'm setting to 3000, but for most safety recently, 5000 is good enough.
    Code:
    reg add "HKCU\Control Panel\Desktop" /v "WaitToKillAppTimeout" /t REG_SZ /d "10000" /f
    reg add "HKLM\System\CurrentControlSet\Control" /v "WaitToKillServiceTimeout" /t REG_SZ /d "10000" /f
    
    Try to create new key LowLevelHooksTimeout and the value too:
    Code:
    reg add "HKCU\Control Panel\Desktop" /v "LowLevelHooksTimeout" /t REG_SZ /d "3000" /f
    reg add "HKCU\Control Panel\Desktop" /v "WaitToKillAppTimeout" /t REG_SZ /d "5000" /f
    reg add "HKLM\System\CurrentControlSet\Control" /v "WaitToKillServiceTimeout" /t REG_SZ /d "5000" /f
    
     
  14. antonio8909

    antonio8909 MDL Guru

    Feb 16, 2014
    3,111
    1,516
    120
    After applying this, Program Manager appeared again and it's preventing Windows from shutting down... I guess that I'll need to click Force shutdown everytime...

    Thanks anyway for your support!
     
  15. LiteOS

    LiteOS Windowizer

    Mar 7, 2014
    2,209
    984
    90
    make a bat file that kills explorer and then run shutdown.exe
     
  16. TairikuOkami

    TairikuOkami MDL Expert

    Mar 15, 2014
    1,172
    1,055
    60
    Have you also applied this?
    Code:
    reg add "HKCU\Control Panel\Desktop" /v "AutoEndTasks" /t REG_SZ /d 1 /f
    When the timeout is set too low on a slow computer, it might cause apps to crash, because once the app starts, windows starts to count and till the app starts, it is considered as non-responding, so it closes (crashes) it in the specified timeout.
     
  17. Javac75

    Javac75 MDL Junior Member

    Mar 16, 2015
    89
    63
    0
    You're right, sir.
    But I had set 3000 on my daily Core2Duo machine already. So far never got crashing. And love the fix which is the gold legacy from XP machine. :D
     
  18. antonio8909

    antonio8909 MDL Guru

    Feb 16, 2014
    3,111
    1,516
    120
    #18 antonio8909, Dec 10, 2020
    Last edited: Dec 11, 2020
    Still happens :/ Program Manager is keeping Windows from turning off TairikuOkami
     
  19. TairikuOkami

    TairikuOkami MDL Expert

    Mar 15, 2014
    1,172
    1,055
    60
    I remember that one. Try to force restart or shutdown.
    Code:
    shutdown /r /f /t 0
    shutdown /s /f /t 0
    It might have also something to do with Windows trying to restore apps after restart/shutdown. :unsure:
    Code:
    reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "RestartApps" /t REG_DWORD /d "0" /f
    reg add "HKLM\System\CurrentControlSet\Control\SecurityProviders\WDigest" /v "UseLogonCredential" /t REG_DWORD /d "0" /f
    reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "DisableAutomaticRestartSignOn" /t REG_DWORD /d "1" /f
     
  20. antonio8909

    antonio8909 MDL Guru

    Feb 16, 2014
    3,111
    1,516
    120
    Hello @TairikuOkami

    Forcing restart/shutdown works but adding those reg entries doesn't fix it... I don't know why is this happening or if I need to formart Windows and start from zero... It's a strange bug.

    Thanks