Microsoft
Visual Studio
Visual Studio
  • Home
    • Problems
    • Suggestions
  • Downloads
    • Visual Studio IDE
    • Visual Studio Code
    • Azure DevOps
    • Team Foundation Server
    • Accounts and Subscriptions
  • Subscriber Access
      • Microsoft 365
      • Azure
      • Office 365
      • Dynamics 365
      • SQL
      • Windows 10
      • Windows Server
      • Enterprise Mobility + Security
      • Power BI
      • Teams
      • Visual Studio
      • Surface for Business
      • AI
      • Internet of Things
      • Azure Cognitive Services
      • Quantum
      • Research
      • Docs
      • TechNet
      • Developer Network
      • Windows Dev Center
      • Windows IT Pro Center
      • FastTrack
      • Partner Network
      • Solution Providers
      • Partner Center
      • Cloud Hosting
      • Education
      • Financial services
      • Government
      • Health
      • Manufacturing & resources
      • Retail
      • Security
      • Licensing
      • AppSource
      • Azure Marketplace
      • Events
    • View all
    Sign in

    Developer Community

    Get help from our community supported forum
    • Home /
    • Visual Studio /
    Searched and didn’t find your feedback?
    • Visual Studio
    • Visual Studio for Mac
    • .NET
    • C++
    • Azure DevOps
    • TFS
    or
    • Visual Studio
    • Visual Studio for Mac
    • .NET
    • C++
    • Azure DevOps
    • TFS
    Visual Studio
    Visual Studio for Mac
    .NET
    C++
    Azure DevOps
    TFS
    26

    Access Denied / Unknown Error / other issues when running on Win7 under multiple user contexts (Admin / normal)

    visual studio 2017Fixed-in: Visual Studio 2017 version 15.3 previewFixed-in: Visual Studio 2017 Version 15.3

    avatar image Andreas Schubert reported Mar 16, 2017 at 03:51 PM

    thub.nodes.view.add-new-comment
    Add comment Show 57

    Add Comment

    10 |10000 characters needed characters left characters exceeded
    avatar image Richard Brown · Mar 18, 2017 at 10:19 PM 0
    Share
    avatar image artl [MSFT] · Mar 23, 2017 at 05:46 AM 0
    Share
    avatar image Richard Brown artl [MSFT] · Mar 23, 2017 at 09:07 AM 0
    Share
    avatar image Andreas Schubert artl [MSFT] · Mar 24, 2017 at 12:07 AM 0
    Share
    avatar image bjoern Andreas Schubert · Mar 24, 2017 at 11:43 PM 0
    Share
    avatar image Visual Studio Feedback System ♦♦ · Mar 23, 2017 at 05:49 AM 0
    Share
    avatar image Richard Brown Visual Studio Feedback System ♦♦ · Mar 23, 2017 at 09:08 AM 0
    Share
    avatar image artl [MSFT] Richard Brown · Mar 23, 2017 at 09:06 PM 0
    Share
    Show more comments
    avatar image Huy Nguyen [MSFT] · Mar 30, 2017 at 12:49 AM 1
    Share
    avatar image Andreas Schubert Huy Nguyen [MSFT] · Mar 30, 2017 at 02:52 AM 0
    Share
    avatar image Jean-Philippe Vankemmel Huy Nguyen [MSFT] · Apr 03, 2017 at 10:42 AM 0
    Share
    avatar image koenigs · Apr 17, 2017 at 08:36 AM 0
    Share
    avatar image TranstecJason · Apr 18, 2017 at 12:40 PM 0
    Share
    avatar image Huy Nguyen [MSFT] · Apr 18, 2017 at 02:46 PM 0
    Share
    avatar image TranstecJason · Apr 18, 2017 at 02:53 PM 0
    Share
    avatar image Huy Nguyen [MSFT] · Apr 18, 2017 at 03:21 PM 0
    Share
    avatar image TranstecJason · Apr 18, 2017 at 05:30 PM 0
    Share
    Show more comments

    Solutions

    · Add your solution
    1

    Solution by avatar image Jeremy Kolb · May 31, 2017 at 05:14 PM

    This does not appear to be fixed in 15.2 (26430.12)

    thub.nodes.view.add-new-comment
    Add comment Show 3 · Share

    Add Comment

    10 |10000 characters needed characters left characters exceeded
    avatar image Greg Ingram · May 31, 2017 at 05:16 PM 0
    Share
    avatar image Su Tolias Greg Ingram · Oct 29, 2017 at 05:48 PM 0
    Share
    avatar image Blair Wang [MSFT] ♦♦ Su Tolias · Oct 30, 2017 at 06:11 AM 0
    Share
    0

    Solution by avatar image Greg Ingram · Jun 12, 2017 at 03:10 PM

    I"m still getting the Access Denied error when trying to run a WPF app using v15.3 Preview 2. I have not looked into it much, but still get the error.

    thub.nodes.view.add-new-comment
    Add comment Show 1 · Share

    Add Comment

    10 |10000 characters needed characters left characters exceeded
    avatar image Huy Nguyen [MSFT] · Jun 12, 2017 at 04:52 PM 0
    Share
    0

    Solution by avatar image Greg Ingram · Jun 21, 2017 at 04:15 PM

    Huy Nguyen sorry for delay. I just noticed your comment. I tried deleting both the privateregistry.bin and privateregistry.user.bin files, opened VS 2017 V3 Preview 2.1 and got the same error.

    thub.nodes.view.add-new-comment
    Add comment Show 1 · Share

    Add Comment

    10 |10000 characters needed characters left characters exceeded
    avatar image Huy Nguyen [MSFT] · Jun 21, 2017 at 09:04 PM 0
    Share
    0

    Solution by avatar image Greg Ingram · Jun 22, 2017 at 10:23 AM

    I got the Access Denied error later when trying to debug WPF app.

    thub.nodes.view.add-new-comment
    Add comment Show 1 · Share

    Add Comment

    10 |10000 characters needed characters left characters exceeded
    avatar image Huy Nguyen [MSFT] · Jun 22, 2017 at 02:55 PM 0
    Share
    0

    Solution by avatar image Greg Ingram · Jun 22, 2017 at 05:02 PM

    I tried another test and found something odd. I performed the following:

    1. Launch VS2017.3 Preview 2.1
    2. Created a WPF app (the usual File > New Project > WPF app.
    3. Wait for everything to load
    4. Clicked Start (to load and debug app).

    I did the steps above twice, but saved in different locations.

    1. C:\Users\MyUserName\Documents\Visual Studio 2017\Projects
      1. This is the out-of-box location for VS projects.
      2. Success. I did not get the Access Denied prompt.
    2. D:\MfgIt\TFS\Dev\Sw\Int
      1. This is a local drive on development machine our team uses to be consistent.
      2. Failed. This is when I get the Access Denied prompt.
      3. The weird thing is I can open this app using the latest VS2015 and will load/debug fine.

    Having the following apps created in both directories above, I followed your steps and attached with file names labeled to show the one with and without errors while using VS2017. I changed the extension from PML to Log in order to attach. Hope this helps.

    logfile-withaccessdeniederror.log

    logfile-withnoaccessdeniederror.log

    thub.nodes.view.add-new-comment
    Add comment Show 2 · Share

    Add Comment

    10 |10000 characters needed characters left characters exceeded
    avatar image Huy Nguyen [MSFT] · Jun 23, 2017 at 07:17 PM 0
    Share
    avatar image Greg Ingram Huy Nguyen [MSFT] · Jun 27, 2017 at 10:52 AM 0
    Share
    out.txt (21.9 kB)
    0

    Solution by avatar image Alex G · Jun 23, 2017 at 03:22 AM

    If VS ever creates volatile keys (as Mr. Huy Nguyen hinted), then MS programmers need to keep in mind the following pitfalls:

    1. You'll gen an error if you try to create a non-volatile key under a volatile key.

    2. If you create a key specifying a few levels of subkeys, Windows will create these levels if they don't exist. BUT if you want to create a volatile subkey, and windows creates those non-existing upper level subkeys for you, they all will be created volatile. If you then try to create a non-volatile subkey under one of those newly created keys, this operation will fail.

    Thus, to avoid much grief with volatile subkeys, make sure your RegCreateKey call to create a volatile key takes an existing parent key handle and only creates a single level of volatile subkey.

    (Thanks Raymond Chen for the recent article on his blog)

    thub.nodes.view.add-new-comment
    Add comment · Share

    Add Comment

    10 |10000 characters needed characters left characters exceeded
    0

    Solution by avatar image Mihai Kanyaro · Jul 19, 2017 at 02:07 PM

    This issue is beyond annoying. I have version 15.2 installed on Windows 7, and it's the 5th time that I have to delete privateregistry.bin

    Thank you MS for selling a beta-level product at full price.

    thub.nodes.view.add-new-comment
    Add comment Show 1 · Share

    Add Comment

    10 |10000 characters needed characters left characters exceeded
    avatar image Huy Nguyen [MSFT] · Jul 19, 2017 at 02:53 PM 0
    Share
    program.txt (10.7 kB)
    attachfile.png (8.8 kB)
    0

    Solution by avatar image John Catenzaro - MSFT [MSFT] · Aug 14, 2017 at 03:49 PM

    This issue has been fixed and is now available in our latest update. You can download the update via the in-product notification or from here: https://www.visualstudio.com/vs/ Thanks to everyone who provided feedback and votes for this problem.



    thub.nodes.view.add-new-comment
    Add comment Show 8 · Share

    Add Comment

    10 |10000 characters needed characters left characters exceeded
    avatar image Nancy Reid · Aug 14, 2017 at 06:59 PM 0
    Share
    avatar image Huy Nguyen [MSFT] Nancy Reid · Aug 14, 2017 at 08:01 PM 0
    Share
    avatar image Nancy Reid Huy Nguyen [MSFT] · Aug 14, 2017 at 08:40 PM 0
    Share
    Show more comments
    avatar image Yannic Schnetz · Aug 21, 2017 at 05:19 AM 0
    Share
    avatar image artl [MSFT] Yannic Schnetz · Aug 21, 2017 at 11:14 PM 0
    Share
    avatar image TranstecJason · Aug 22, 2017 at 12:36 PM 0
    Share
    avatar image Huy Nguyen [MSFT] TranstecJason · Aug 22, 2017 at 09:14 PM 0
    Share
    0

    Solution by avatar image Huy Nguyen [MSFT] · Apr 03, 2017 at 11:19 PM

    Quick update on the status of this problem:

    For "Unknown Error" starting VS on Windows 8.1 or Windows 10: This problem is not related to the private registry file. A fix for this problem is available now for the latest version of both Visual Studio 2017 (https://www.visualstudio.com/vs/) or Visual Studio 2017 Preview (https://www.visualstudio.com/vs/pre).

    For "Unknown Error" starting VS or Access Denied on Windows 7:

    Please try this work-around first, especially if the current user account is a member of the Administrators group on the machine.

    1. Close all Visual Studio instances
    2. Delete the file %LocalAppData%\Microsoft\VisualStudio\15.0_[ID]\vspdmc.lock
    3. Start Visual Studio again

    If deleting vspdmc.lock does not work, we will need to reset the private registry file

    1. Export your current settings using Tools | Import and Export Settings... (this step is optional and may fail)
    2. Close all Visual Studio instances
    3. Delete %LocalAppData%\Microsoft\VisualStudio\15.0_f4938f75\privateregistry.bin file (The ID after 15.0_ may be different per machine)
    4. Start VS as an Admin user if the current user account is a member of the Administrators group on the machine. Otherwise start VS.
    5. Import your current settings back.

    We've identified 2 potential issues with private registry file on Windows 7 and implemented fixes for them. The fix will be available first on Visual Studio 2017 Preview and we will notify the community when it is.

    Best regards,
    Huy Nguyen, Visual Studio team

    thub.nodes.view.add-new-comment
    Add comment Show 25 · Share

    Add Comment

    10 |10000 characters needed characters left characters exceeded
    avatar image Dean Jackson · Apr 08, 2017 at 03:44 PM 1
    Share
    avatar image Alex G · Apr 15, 2017 at 04:28 PM 0
    Share
    avatar image Huy Nguyen [MSFT] Alex G · Apr 17, 2017 at 08:17 PM 0
    Share
    avatar image bjoern Huy Nguyen [MSFT] · Apr 18, 2017 at 10:39 AM 0
    Share
    avatar image koenigs · Apr 17, 2017 at 08:46 AM 0
    Share
    avatar image Huy Nguyen [MSFT] koenigs · Apr 17, 2017 at 07:28 PM 0
    Share
    avatar image koenigs Huy Nguyen [MSFT] · Apr 20, 2017 at 12:57 AM 0
    Share
    avatar image Dino Chan · Apr 26, 2017 at 02:37 AM 0
    Share
    avatar image Eric Maia · May 05, 2017 at 02:16 PM 1
    Share
    importexport.png (6.9 kB)
    avatar image Huy Nguyen [MSFT] Eric Maia · May 05, 2017 at 04:03 PM 0
    Share
    avatar image Eric Maia Huy Nguyen [MSFT] · May 05, 2017 at 04:22 PM 0
    Share
    Show more comments
    avatar image Moh Abdulaziz · Jul 07, 2017 at 04:55 AM 0
    Share
    0

    Solution by avatar image Alan Bourke · Apr 18, 2017 at 04:33 PM

    I am also experiencing what @TranstecJason is experiencing - I updated to v15.1 (26403.7 ) this morning and while it was OK initially I eventually started getting 'Unknown Error' when launching the IDE as normal user or 'run as administrator'. I once again had to delete privateregistry.bin and run the IDE as administrator to get it working again.

    thub.nodes.view.add-new-comment
    Add comment Show 2 · Share

    Add Comment

    10 |10000 characters needed characters left characters exceeded
    avatar image mohammad parsa · Apr 13, 2018 at 09:36 AM 0
    Share
    avatar image Huy Nguyen [MSFT] mohammad parsa · Apr 13, 2018 at 04:00 PM 0
    Share
    • 1
    • 2
    • ›
    Follow

    232 People are following this

    Related Problems

    Build Failure. Error: 'path' cannot be an empty string ("") or start with the null character.
    1 Solution

    Sync of open file to the item on Solution Explorer
    1 Solution

    Repair reset all my settings
    1 Solution

    Track Active Item in Solution Explorer no longer works
    2 Solution

    Inconsistent behaviour with Output Directory and Intermediate Directory (change from VS2015)
    1 Solution

    Installed extensions getting lost when moving to a new build
    1 Solution

    Publish fails with 'All build submissions in a build must use project instances originating from the same project collection'
    5 Solution

    ADODB 2.7 reference accepted in VS2015, rejected in VS2017
    1 Solution

    The "report-a-problem" tool fails silently behind HTTP proxy
    2 Solution

    Some files not tracked by Solution Explorer
    1 Solution

    What's new

    • NEW Surface Pro 6
    • NEW Surface Laptop 2
    • NEW Surface Go
    • Xbox One X
    • Xbox One S
    • VR & mixed reality
    • Windows 10 apps
    • Office apps

    Store & Support

    • Account profile
    • Download Center
    • Sales & support
    • Returns
    • Order tracking
    • Store locations
    • Support
    • Buy online, pick up in store

    Education

    • Microsoft in education
    • Office for students
    • Office 365 for schools
    • Deals for students & parents
    • Microsoft Azure in education

    Enterprise

    • Microsoft Azure
    • Enterprise
    • Data platform
    • Find a solution provider
    • Microsoft partner resources
    • Microsoft AppSource
    • Manufacturing & resources
    • Financial services

    Developer

    • Microsoft Visual Studio
    • Windows Dev Center
    • Developer Network
    • TechNet
    • Microsoft developer program
    • Channel 9
    • Office Dev Center

    Company

    • Careers
    • About Microsoft
    • Company news
    • Privacy at Microsoft
    • Investors
    • Diversity and inclusion
    • Accessibility
    • Security
    English (United States)
    • Sitemap
    • Contact us
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2018
    • Anonymous
    • Sign in
    • Spaces
    • Visual Studio
    • Visual Studio for Mac
    • .NET
    • C++
    • Azure DevOps
    • TFS
    • Explore
    • Topics
    • Problems
    • Features
    • Users
    • Badges