Uninstall drivers by dpinst with /D.

I uninstall driver by such command line:

dpinst.exe /Q /D /U C:\driver_folder\driver.inf

In the article Using DPInst to Uninstall Driver Packages there is note about /D option. It says that since Windows 7 driver binaries are not actually deleted when /D option is present.

However on Windows 8 driver sys-files in folder Windows\System32\drivers were deleted after reboot. If I remove /D from command line driver binaries are not deleted.

Does /D actually work or not?

July 13th, 2015 2:07am

Hi Andrey,

Are you developing a driver package and you want to test it to uninstall this package with the dpinst.exe tool? Is this driver you have uninstalled a PNP function driver?

Here is a link for reference of how dpinst removes the drivers.(Pay attention to the "Removing PnP Function Drivers" and "Removing Class Filter Drivers" part)

Removing Driver Packages

https://msdn.microsoft.com/en-us/library/windows/hardware/ff549839(v=vs.85).aspx#removing_class_filter_drivers


Best regards

Free Windows Admin Tool Kit Click here and download it now
July 14th, 2015 2:23am

Note at the end of the document:

"Note   Starting with Windows 7, both the deleteBinaries XML element and the /d switch are ignored by the operating system. Binary files, which were copied to a system when a driver package was installed, can no longer be deleted by using DPInst."

It means that driver binary should not be removed even if /d is present. But it is not true at least on Windows 8.1.

July 14th, 2015 2:31am

Hi Andrey,

Have you checked the link I have posted? Is the driver you have uninstalled a PNP function Driver?

Removing PnP Function Drivers

To remove a PnP function driver, DPInst:

  • Removes the driver package INF file from the system INF file directory.

  • Removes the driver from all of the devices on which DPInst is installed.

  • From all of the other drivers that are installed on a computer, installs the best compatible driver for each device. If there is no other compatible driver for a device:

    • (Windows Vista and later versions of Windows) DPInst does not remove the device from the device tree and installs a null driver for the device.
    • (Windows Server 2003, Windows XP, and Windows 2000) DPInst removes the device from the device tree.
  • Removes the driver package from the DIFx driver store.

  • Removes the entry that represents the driver package from Programs and Features in Control Panel.
      Note  In versions of Windows earlier than Windows Vista, DPInst removed this entry for the driver package from Add or Remove Programs in Control Panel.

Best regards

Free Windows Admin Tool Kit Click here and download it now
July 14th, 2015 9:38pm

Have you checked the link I have posted? Is the driver you have uninstalled a PNP function Driver?

Thank you for link. I have read it. My driver is filter driver.

But I cannot find any information about binary files in this article. How about binary files? Does dpinst remove them?

July 14th, 2015 11:51pm

Hi Andrey,

Exactly the link I have posted didn`t include the information about the binary files.
Since you have tested this and you have got your answer. I believe the test result that the binary files will be removed.
Because the DPInst is a tool included in the WDK and it has been included in the Visual Studio 2013, we are lack of the resources to test this due to the limited working environment. It is recommended to post a case in our MSDN forum. They have more resources to help you. Thanks for your understanding and cooperation.

MSDN Forum

https://social.msdn.microsoft.com/Forums/en-US/home

Best r

Free Windows Admin Tool Kit Click here and download it now
July 15th, 2015 10:38pm

Thank you for help.

And where is your MSDN forum? Can you give me a link to it?

July 15th, 2015 10:41pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics