Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Hardware & Devices
  4. Restarting a Windows PC after driver installation

Restarting a Windows PC after driver installation

Scheduled Pinned Locked Moved Hardware & Devices
helpquestionannouncement
4 Posts 3 Posters 16 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Daniel Pfeffer
    wrote on last edited by
    #1

    I have written a Windows device driver that updates the firmware on a certain device, via Windows Update. The sequence of operations is as follows: * The driver is downloaded from Windows Update, and scheduled for installation * The PC is rebooted (either by the user, or at the Windows idle time) * During restart, the firmware is downloaded to the device * An additional reboot is required in order to program the firmware into the device It is this last step that I cannot get working. Other than writing some sort of application that requests the user to reboot the system after the driver is installed (error-prone, and inelegant), is there a way for the device driver to tell Windows that a reboot is required?

    Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

    L G 2 Replies Last reply
    0
    • D Daniel Pfeffer

      I have written a Windows device driver that updates the firmware on a certain device, via Windows Update. The sequence of operations is as follows: * The driver is downloaded from Windows Update, and scheduled for installation * The PC is rebooted (either by the user, or at the Windows idle time) * During restart, the firmware is downloaded to the device * An additional reboot is required in order to program the firmware into the device It is this last step that I cannot get working. Other than writing some sort of application that requests the user to reboot the system after the driver is installed (error-prone, and inelegant), is there a way for the device driver to tell Windows that a reboot is required?

      Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Hi Daniel, [redacted] The only technique I can think of would be using the [WUAPI](https://docs.microsoft.com/en-us/windows/desktop/api/wuapi/) to [force reinstall](https://docs.microsoft.com/en-us/windows/desktop/api/wuapi/nf-wuapi-iupdateinstaller-put\_isforced) your device driver. You didn't mention anything about your co-installer but you would probably need to add something to detect that the firmware was already present and up-to-date after the reboot. Whether or not this is more elegant is debatable. In my opinion your co-installer should be responsible for the user notification and reboot. Best Wishes, -David Delaune

      D 1 Reply Last reply
      0
      • L Lost User

        Hi Daniel, [redacted] The only technique I can think of would be using the [WUAPI](https://docs.microsoft.com/en-us/windows/desktop/api/wuapi/) to [force reinstall](https://docs.microsoft.com/en-us/windows/desktop/api/wuapi/nf-wuapi-iupdateinstaller-put\_isforced) your device driver. You didn't mention anything about your co-installer but you would probably need to add something to detect that the firmware was already present and up-to-date after the reboot. Whether or not this is more elegant is debatable. In my opinion your co-installer should be responsible for the user notification and reboot. Best Wishes, -David Delaune

        D Offline
        D Offline
        Daniel Pfeffer
        wrote on last edited by
        #3

        Having Windows Update handle the reboot is the ideal solution from my point of view. Thanks for the pointers.

        Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

        1 Reply Last reply
        0
        • D Daniel Pfeffer

          I have written a Windows device driver that updates the firmware on a certain device, via Windows Update. The sequence of operations is as follows: * The driver is downloaded from Windows Update, and scheduled for installation * The PC is rebooted (either by the user, or at the Windows idle time) * During restart, the firmware is downloaded to the device * An additional reboot is required in order to program the firmware into the device It is this last step that I cannot get working. Other than writing some sort of application that requests the user to reboot the system after the driver is installed (error-prone, and inelegant), is there a way for the device driver to tell Windows that a reboot is required?

          Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

          G Offline
          G Offline
          Gabimruk
          wrote on last edited by
          #4

          pamiętaj, najpierw zapisz wszytkie dane

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups