Prevent Windows 10 from automatically restarting after an update programmatically

前端 未结 3 1972
梦如初夏
梦如初夏 2021-01-04 10:42

QUESTION: Is there a programmatic way to prevent Windows 10 from automatically restarting after an update?

We work on \"mission-critical\" software

3条回答
  •  感情败类
    2021-01-04 11:31

    The registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings contains two entries: ActiveHoursStart and ActiveHoursEnd. Change these entries as needed inside your program to prohibit a reboot. This way you can control the reboot not to take place while your program runs. Note that you need elevated privilege to change these settings.

提交回复
热议问题