none
Removing registry keys upon driver rollback RRS feed

  • Question

  • Hi,

    I've encountered an issue with cleaning up the registry hive upon driver rollback. In my newest driver some registry keys were added/set upon installation. These registry keys either didn't exist in the previous driver version or they shouldn't have been set for proper operation. However, when performing driver rollback, these reg keys aren't cleaned, resulting in a broken behavior. I assume that driver rollback consists of uninstalling the current driver and installing the previous one (is that correct?). I can't touch the previous driver .inf (it's signed) so I can only play with uninstallation of the new driver. Ideally, I wanted something like DelReg directive that will be run upon driver uninstallation. From brief internet searching, I understand that .inf doesn't support uninstall directives anymore (is that correct?). If so, what is the proper way to clean up these registry keys? Naturally, I don't want to force the end user to execute some custom script on top of the rollback trigger.

    Thanks

    Tuesday, March 6, 2018 9:18 PM

Answers

  • Hello,

    Driver rollback does not consist of uninstalling the current driver and installing the previous one. Driver rollback just takes the previous driver and installs it on top of what ever is currently on the devices. Any settings that is currently on the devise and not written by the driver being rolled back will stay on the devices. 

    Thanks.

    Monday, March 12, 2018 6:13 PM
    Moderator

All replies

  • Hello,

    Driver rollback does not consist of uninstalling the current driver and installing the previous one. Driver rollback just takes the previous driver and installs it on top of what ever is currently on the devices. Any settings that is currently on the devise and not written by the driver being rolled back will stay on the devices. 

    Thanks.

    Monday, March 12, 2018 6:13 PM
    Moderator
  • Ok, that explains the behavior I observed. But I have to wonder why... The entire purpose of rolling back is to restore the driver to a previous non-faulty state. Keeping the current driver settings instead of forcing the previous driver default configuration prevents the full state restoration and might cause undesirable effects (just like in my situation described above), up to a full system crash.
    • Edited by -IgorC- Tuesday, March 13, 2018 7:04 PM
    Tuesday, March 13, 2018 7:03 PM
  • the same logic is applied on driver update, nothing is deleted. the app compat risk is too high to start deleting values, especially as the OS has no understanding of what these settings are and what they do (or the lack of them will do)

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, March 13, 2018 7:26 PM
  • There is one key difference between update and rollback from user perspective: updating is normally intended to bring in new/improved functionality, while rolling back is a restoration measure for a system broken in one or more ways.
    Tuesday, March 13, 2018 9:43 PM