Restrict Driver Installation Using Windows Registry
This guide explains how to prevent the installation of unauthorized or non-standard hardware drivers on Windows using the Registry Editor (Regedit). By configuring device installation restriction policies within the registry, system administrators can enforce strict hardware compliance, block unapproved peripheral devices, and ensure that only pre-authorized or standard drivers are deployed across workstations.
Step 1: Open the Registry Editor
- Press
Win + Rto open the Run dialog box. - Type
regeditand press Enter. - Select Yes when prompted by User Account Control (UAC).
Step 2: Navigate to the Device Installation Policy Key
Navigate to the following path in the Registry Editor address bar:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows
Check if the DeviceInstall key exists under
Windows: * If it exists, expand it and look for the
Restrictions key. * If either key is missing, right-click
on the parent key, select New > Key, and name them
sequentially to create:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DeviceInstall\Restrictions
Step 3: Configure Device Restriction Values
Select the Restrictions key to configure policy values
that control driver installations:
1. Block Unapproved/Unspecified Drivers
To block all hardware drivers that are not explicitly permitted by an
approved list: 1. Right-click inside the right pane of
Restrictions. 2. Select New > DWORD (32-bit)
Value. 3. Name the value DenyUnspecified. 4.
Double-click DenyUnspecified and set its Value
data to 1. 5. Click OK.
2. Apply Restrictions to Administrators (Optional)
By default, these restrictions may not apply to local administrators.
To enforce restrictions on administrators as well: 1. Create a new
DWORD (32-bit) Value named
DenyDeviceClassesRetroactive or
DenyUnspecified. 2. Create another DWORD (32-bit)
Value named DenyAdminInstall. 3. Double-click
DenyAdminInstall and set its Value data to
1. 4. Click OK.
Step 4: Whitelist Approved Standard Hardware (Optional)
If DenyUnspecified is set to 1, you must
specify standard hardware classes to allow necessary hardware (such as
approved keyboards, mice, or system devices) to install:
- Under
Restrictions, right-click and create a new key namedAllowDeviceClasses. - Inside
AllowDeviceClasses, create String Values (REG_SZ) numbered sequentially (1,2,3, etc.). - Set the Value data of each string to the approved
Device Class GUID (for example,
{4d36e96b-e325-11ce-bfc1-08002be10318}for standard keyboards).
Step 5: Apply and Verify the Policy
- Close the Registry Editor.
- Restart the computer, or open the Command Prompt as Administrator
and run
gpupdate /forceto immediately apply policy changes. - To verify, attempt to connect a non-standard device. Windows will display an error indicating that installation has been blocked by system policy.