none
UpdateDriverForPlugAndPlayDevices() returns 1072 (0x430) - service has been marked for deletion on Windows 10 1903 RRS feed

  • Question

  • This appears to be new behavior in Windows 10 1903.

    We have been using the following sequence of calls to upgrade our driver package:

     - SetupInstallFromInfSection()

     - SetupUninstallOEMInf()

     - UpdateDriverForPlugAndPlayDevices()

    This all works fine on all Windows versions except Windows 10 1903. The call to UpdateDriverForPlugAndPlayDevices() now returns ERROR_SERVICE_MARKED_FOR_DELETE. We want to avoid having the customer go through an uninstall, reboot, install, reboot cycle.

    Is there a better way to accomplish updating the driver without requiring 2 reboots?

    Tuesday, July 23, 2019 3:18 PM

Answers

  • Are you literally doing those calls in that order?  Why wouldn't you uninstall first?  The driver has to be unloaded for uninstall to complete.  Are all of the existing instances closed?

    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Tuesday, July 23, 2019 5:10 PM
  • This is an issue we're looking at.  I would switch to newer APIs, though:

    DiInstallDriver (installs driver and updates all devices), then DiUninstallDriver


    Wednesday, July 24, 2019 6:41 PM

All replies

  • Are you literally doing those calls in that order?  Why wouldn't you uninstall first?  The driver has to be unloaded for uninstall to complete.  Are all of the existing instances closed?

    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Tuesday, July 23, 2019 5:10 PM
  • This is an issue we're looking at.  I would switch to newer APIs, though:

    DiInstallDriver (installs driver and updates all devices), then DiUninstallDriver


    Wednesday, July 24, 2019 6:41 PM
  • Thank you for the reply and information. I will try to incorporate the new APIs.
    Friday, July 26, 2019 5:52 PM
  • So what is the correct order to update: install new package first then uninstall old, or v.v.?

    - pa

    Friday, July 26, 2019 9:57 PM
  • Either one gets to the same final result, but if you uninstall first the device has to be updated twice so I would do the install first.
    Monday, July 29, 2019 6:18 PM