Blocking WU from specific device driver updates (PowerShell script)

garlin

Moderator
Staff member
Users have reported seeing issues after Windows Update randomly replaces an existing 3rd-party driver with a different version, without confirmation. You might have a valid reason for keeping a specific driver, and don't want Windows touching it.

Most users learn you can disable WU entirely, or just disable driver updates. Unfortunately, this is an all-or-nothing fix that blocks other drivers from being offered. A third option for W10/11 to enable a GPO which blocks updates for specific Hardware ID's.

To make this simpler, I have a PowerShell script which creates a hardware device exclusion list based on your selections. This reg file can be applied for immediate use, or integrated into an image to prevent WU from seeing them. The device list does not prevent you from installing or uninstalling drivers, it only hides that device from WU. Any device not hidden will get suggested driver updates.

One major drawback about this process, is you need to install Windows at least once to see the correct HW ID. While NTLite can integrate a driver set, there's no way for it to predict what the actual real-world HW ID will match on. Some driver INF files cover a wide range of HW ID's with the same driver package.

Run the DenyDeviceIDs.bat script:
You can use Shift or Control key to select multiple lines.

Capture.PNG

The script creates two reg files:
Enable_DeviceInstall_Restrictions.reg blocks WU.​
Disable_DeviceInstall_Restrictions.reg clears all the settings.​

Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DeviceInstall]

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DeviceInstall\Restrictions]
"DenyDeviceIDs"=dword:00000001
"DenyDeviceIDsRetroactive"=dword:00000000

[-HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DeviceInstall\Restrictions\DenyDeviceIDs]

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DeviceInstall\Restrictions\DenyDeviceIDs]
;
; Microsoft High Definition Audio Device
"1"="HDAUDIO\\FUNC_01&VEN_15AD&DEV_1975&SUBSYS_15AD1975"
;
; Microsoft Intel(R) 82574L Gigabit Network Connection
"2"="PCI\\VEN_8086&DEV_10D3&SUBSYS_07D015AD"
;
; VMware, Inc. VMware SVGA 3D
"3"="PCI\\VEN_15AD&DEV_0405&SUBSYS_040515AD"

Suggested uses include blocking graphics & audio devices from unwanted updates. No reboot is required.
 

Attachments

  • DenyDeviceIDs.zip
    997 bytes
Back
Top