Access denied occurs in visual studio installation process


when I try to install Visual Studio Professional (2012, 2013, 2013 with SP2), an error occurs: Setup engine (Access is denied).

Log file shows me this errors:

[0520:1D30][2014-08-04T09:55:40]i000: MUX:  Installation size in bytes for package: vcRuntimeMinimum_x64 MaxAppDrive: 0  MaxSysDrive: 3470762  AppDrive: 0  SysDrive: 3470762
[0520:1D30][2014-08-04T09:55:40]i000: MUX:  Return Code:0x0 Msi Messages:0 Result Detail:RemoveExistingProducts Restart:None
[0520:1D30][2014-08-04T09:55:40]i000: MUX:  Reset execution Result
[0520:1D30][2014-08-04T09:55:40]i000: MUX:  Reset Result
[0520:1D30][2014-08-04T09:55:40]i319: Applied execute package: vcRuntimeMinimum_x64, result: 0x0, restart: None
[22D0:22D4][2014-08-04T09:55:40]i325: Registering dependency: {02a877fe-5dac-4ac0-b869-4b9da00f651c} on package provider: Microsoft.VS.VC_RuntimeMinimumVSU_amd64,v12, package: vcRuntimeMinimum_x64
[22D0:22D4][2014-08-04T09:55:40]e000: Error 0x80070005: Failed to register the dependency on package dependency provider: Microsoft.VS.VC_RuntimeMinimumVSU_amd64,v12
[22D0:22D4][2014-08-04T09:55:40]e000: Error 0x80070005: Failed to register the dependency on the package provider.
[22D0:22D4][2014-08-04T09:55:40]e000: Error 0x80070005: Failed to execute package dependency action.
[0520:1D30][2014-08-04T09:55:40]e000: Error 0x80070005: Failed to register the dependency on per-machine package.
[0520:1D30][2014-08-04T09:55:40]e000: Error 0x80070005: Failed to execute dependency action.
[22D0:22D4][2014-08-04T09:55:40]w331: Could not remove dependency: {02a877fe-5dac-4ac0-b869-4b9da00f651c} on package provider: Microsoft.VS.VC_RuntimeMinimumVSU_amd64,v12, package vcRuntimeMinimum_x64, error: 0x80070005
[22D0:22FC][2014-08-04T09:55:40]i305: Verified acquired payload: cab41974C84E43AEE700F28BA7B03AF3FF7 at path: C:\ProgramData\Package Cache\.unverified\cab41974C84E43AEE700F28BA7B03AF3FF7, moving to: C:\ProgramData\Package Cache\{9347889B-C22A-3905-901F-C05D8F73C929}v12.0.21005\packages\BuildTools_MSBuildResMsi_x86\
[0520:0BBC][2014-08-04T09:55:40]i000: MUX:  Source confirmed

I have stopped my antivirus for installation time, run installation as administrator and I followed this page:

I have windows 7 with SP1 (x64), .net framework 4.5.1.

asked on Stack Overflow Aug 4, 2014 by Marcin • edited Aug 5, 2017 by Cœur

6 Answers


just stop your antivirus and try again. this solved my problem

answered on Stack Overflow Mar 29, 2016 by Mahmoud

I found a solution that works on Windows 7.

You have to open Windows registry (WIN+R then regedit). Find keys that start with HKEY_CLASSES_ROOT\Installer\Dependencies.

When you click on them you should get Access denied error. You have to change permissions on them. You can do that following those steps:

  1. Right-click on the problem key
  2. Select Permissions...
  3. Add yourself to Group or user names (fill the Enter the object names to select (examples) field by clicking on Advanced then Find now and click on your user name)
  4. give yourself Full Control > Allow
  5. click Advanced
  6. Choose Owner tab
  7. Change Owner to yourself, check the box Replace owner on subcontainers and objects..., and click OK
  8. Ignore the Access denied error message
  9. Click OK twice
  10. Voila, you have full access

If you do this for every key, you will be able to install VS.

I found this solution here.

answered on Stack Overflow Jul 10, 2015 by cmenti • edited May 14, 2018 by Basj

Same issues trying to install VS 2015 and VS 2017 on a Win 10 box. Unfortunately None of the above worked for me. Main problem was access issues to "C:\Program Files\dotnet\swidtag", the swidtag directory was completely inaccessible even from the local admin account - ownership was unknown and couldn't be changed.

I noticed that when I booted in safe mode that dir disappeared. On a whim, I removed the PC from the domain (changed to workgroup), logged on as Administrator and did a "Run As Admin" on the installer.

The swidtag directory was then accessible and .net core installation completed successfully.

I still had problems with installing the various VC runtimes (2017, 2015, 2013). I had to install them manually, but before that would work I had to do a disk clean, including removing previous install points, then reboot for each runtime installer.

That finally allowed the rest of the VS installer to complete.

answered on Stack Overflow Jan 1, 2018 by user2442280

MalwareBytes was blocking access, had to turn it off to get this working

answered on Stack Overflow Feb 20, 2020 by chillfire

On a corporate machine I cannot disable the anti virus software.

Changing the Compatibility options for the vs_community_ENU.exe executable to Run this program as an administrator resolved the problem for me.

answered on Stack Overflow Aug 4, 2016 by Aaron

I got this error today.

The message at the beginning of the log file was

error 0x5: Access is denied 
at System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited)

In my case it was Microsoft Excel (Office 365) that was preventing access to the required folders or files.

It seems that not only anti-virus software can trigger this behaviour.

answered on Stack Overflow May 19, 2020 by João Quintas

User contributions licensed under CC BY-SA 3.0