How can a required reboot be detected for Windows 7

后端 未结 3 1856
梦如初夏
梦如初夏 2020-12-10 04:43

I am working on a project where several software and drivers are installed on a windows 7 PC. This shall work without user inputs.

Now there is the question: How can

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-10 05:02

    Use the following registry key:

    HKLM\System\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations
    

    Source: How to find out if an MSI I just installed requested a windows reboot?

    As discovered by the asker of this question HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending shows when a reboot is pending on the machine as long as the OS is Vista or newer.

提交回复
热议问题