Access denied occurs in visual studio installation process

18,048

Solution 1

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

Solution 2

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.

Solution 3

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.

Solution 4

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

Share:
18,048
Marcin
Author by

Marcin

Updated on June 06, 2022

Comments

  • Marcin
    Marcin almost 2 years

    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\BuildTools_Res1.cab.
    [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:

    http://support.microsoft.com/kb/2872457/pl

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

    • user85
      user85 almost 9 years
      Please post solution if this problem is resolved. I'm also encountering same issue.
    • Marcin
      Marcin almost 9 years
      My solution wasn't cool. I reinstalled my windows 7.
  • luisdev
    luisdev about 8 years
    Worked for me too. Thanks.
  • kordiseps
    kordiseps over 6 years
    HKEY_CLASSES_ROOT\Installer\Dependencies I clicked right and gave permissions that. It solved my problem
  • Basj
    Basj almost 6 years
    This solution was useful and helped me to install VS2013! Also this was useful: youtube.com/watch?v=f1lhIN4rY1M