How to Resolve ERROR_ACCESS_DENIED Error on Windows 10/11

Access Denied
Quick Fix

Click to download Outbyte PC Repair and discover its benefits for your Windows system.

Designed for Windows 10 and 11.

Take advantage of our special offer to enhance your PC performance. For more details, please read About Outbyte, and Uninstall Instructions. Also, please review our End User License Agreement (EULA) and Privacy Policy.

The SetupDiSetDeviceProperty function assigns properties to a device instance, which is a unique identification string for a device in the system. This function is crucial as it allows you to set the display name and other parameters for your computer’s devices.

SetupDiSetDeviceProperty is part of a unified device property model that is supported by Windows operating systems. This device property model defines how your devices are represented, describes their functions, and sets up their configuration in the Windows operating system. This process applies to all hardware attached to your computer, including sound, display, network, and other devices.

Here is the syntax used for the SetupDiSetDeviceProperty process:

WINSETUPAPI BOOL SetupDiSetDeviceInterfacePropertyW(

HDEVINFO DeviceInfoSet,

Expert Tip: For smoother PC performance, consider using a PC optimization tool. It handles junk files, incorrect settings, and harmful apps. Make sure it's right for your system, and always check the EULA and Privacy Policy.

Free Scan for PC Issues
Compatible with: Windows 10/11, Windows 7, Windows 8

Special offer. About Outbyte, uninstall instructions, EULA, Privacy Policy.


const DEVPROPKEY *PropertyKey,


const PBYTE PropertyBuffer,

DWORD PropertyBufferSize,


The SetupDiSetDeviceProperty is successful if it returns TRUE. When an error occurs somewhere in the process, it returns FALSE with a specific return code.

One of the return codes that Windows users encounter is the ERROR_ACCESS_DENIED error on Windows 10/11. When this error happens, the SetupDiSetDeviceProperty process fails and cannot continue. The root cause of the error has to be resolved first before trying again.

What Is the Cause of ERROR_ACCESS_DENIED Error?

The return code ERROR_ACCESS_DENIED happens because “the caller does not have Administrator privileges.” In case you are wondering why SetupDiSetDeviceProperty returned ERROR_ACCESS_DENIED, it just means that you don’t have full writing permission to the device you are trying to modify. It is either you are using a non-admin account or you are using an admin account with limited privileges.

To resolve this error, you must check your account privileges and whether the device you are trying to edit requires specific permissions.

Another cause of ERROR_ACCESS_DENIED is a compatibility issue. If the program you are trying to modify was designed for an earlier version of Windows OS, it might not be compatible with Windows 10/11, hence the error. This error could also appear if the affected program is outdated or corrupted.


The ERROR_ACCESS_DENIED error on Windows 10/11 might seem complicated, but the fixes are actually simple. But before you try any of the methods below, get rid of junk files first using Outbyte PC Repair and scan your computer for viruses and malware.

These steps will help clean up your computer and optimize your system for the troubleshooting process. Once done, restart your computer and work your way down through the items below.

Fix #1: Repair Damaged System Files.

One of the possible reasons why SetupDiSetDeviceProperty returns ERROR_ACCESS_DENIED is because some system files associated with the program you want to modify have been damaged or corrupted. To check the integrity of your system files, you can use the System File Checker or SFC tool, which is built into the Windows system.

To run a scan using SFC, follow the steps below:

  1. Click Command + X to open the Power menu, then choose Command Prompt (Admin) from the options.
  2. Enter sfc /scannow in the Command Prompt window, then hit Enter.
  3. Wait for the scan to be completed. SFC will automatically attempt to replace damaged system files with good copies from the Windows recovery image file.

Restart your computer for the new changes to be applied and check if the ERROR_ACCESS_DENIED error still persists.

Fix #2: Run in Compatibility Mode.

Running a program that was designed for an earlier Windows operating system, such as Windows 7, Windows 8, or Windows 8.1, can lead to compatibility issues. However, it doesn’t mean that these old programs are obsolete. You can run them in compatibility mode so that they work correctly and smoothly.

To run your program in compatibility mode:

  1. Right-click your program’s shortcut on the Desktop, then click Properties from the right-click menu.
  2. Click on the Compatibility tab.
  3. Under Compatibility Mode, choose which Windows version you want to use, then click OK.
  4. Tick off Run this program as an administrator as well.

Once you’ve set your program to run in compatibility mode with the Windows version you are using, try the SetupDiSetDeviceProperty function again and see if it still returns ERROR_ACCESS_DENIED. If it does, proceed to the next step.

Fix #3: Update Your Program.

Sometimes errors happen just because you failed to update your program. Check Windows Update under Settings > System & Security and see if there are any pending software or system updates. Install all available updates under Windows Update.

If you don’t see any, check the software developer’s website – there might be new patches or updates that need to be downloaded. Download them manually and install them on your computer to update your program. After updating, reboot your system and see if the ERROR_ACCESS_DENIED error has been fixed.

Fix #4: Undo Recent System Changes.

If you installed or deleted something before the ERROR_ACCESS_DENIED error appeared, this action might have affected your system and caused the error. Think back to what you did and undo it if possible.

If you recently installed an update, you can roll your system back to when everything was working fine by following the steps below:

  1. Click Start, then go to Settings.
  2. Click on Update & Security, then click on Windows Update > Update History.
  3. Click the View installed update history link.
  4. You’ll be presented with a list of all the recently installed updates. Click on the most recent and hit the Uninstall Update button.
  5. You will need to restart your computer for the changes to take effect, then check if the ERROR_ACCESS_DENIED error still appears.

Fix #5: Uninstall, then Reinstall the Affected Program.

If you still encounter the ERROR_ACCESS_DENIED error on Windows 10/11 even after trying the methods above, your last option will be to uninstall the program.

To uninstall a program on Windows 10/11:

  1. Go to Start > Settings > System, then click on Apps & features from the left menu.
  2. Choose the program you want to uninstall.
  3. Click on the Uninstall button.
  4. Restart your computer.

To reinstall the program, download a copy of the installer from the developer’s website or via Microsoft Store. Click on the downloaded file and install the program according to the instructions.


SetupDiSetDeviceProperty is an important function because it defines how a program should run. If you encountered the ERROR_ACCESS_DENIED error on Windows 10/11, simply follow the troubleshooting guide above to resolve it.

Give us some love and rate our post!
[Total: 0 Average: 0]
Notify of
Inline Feedbacks
View all comments
Featured Stories
How to Disable Bing Search in Windows 11: A Detailed Guide
NVIDIA GeForce Driver Download Failed: How to Troubleshoot and Resolve
‘Getting Windows Ready’ Stuck: How to Fix
The PhoneExperienceHost.exe and YourPhone.exe Processes
How to Create a Restore Point in Windows 10: A Comprehensive Guide
Audio Recording Software for Windows 10
The Ultimate Guide to Cloning Your Hard Drive on Windows and Mac
Create a Windows 11 Bootable USB : Your Ultimate How-To Guide
How to Turn Off or Turn Back On Touch Screen on Windows 10