Home Dashboard Directory Help
Search

Visual Studio 2012 messes up registry ACL's by MichaelRandrup


Status: 

Closed
 as Not Reproducible Help for as Not Reproducible


5
0
Sign in
to vote
Type: Bug
ID: 780014
Opened: 2/26/2013 12:46:22 AM
Access Restriction: Public
0
Workaround(s)
view
2
User(s) can reproduce this bug

Description

Visual Studio 2012 (or an update to VS2012 maybe) messes up the HKEY_CLASSES_ROOT\VisualStudio.xxx.11.0 ACL's, resulting in an "Access Denied" error. When searching for the issue, I can see numerous people are experiencing different types of errors, related to "Access Denied" from the registry.

For me, the error is that I cannot add any files to my TFS Server, because it needs to read those registry keys.

The worst part is, that I cannot use regedit (or a script), to reset the Access on the registry keys, because that also results in an "Access Denied" error. Reinstalling VS2012 does not help either, the error persist.

No one in forums, etc. has been able to resolve this critical issue, or offer any workarounds, so now I am hoping that you guys can provide some means of help.
Details
Sign in to post a comment.
Posted by ClearIncentive on 3/5/2013 at 12:06 PM
I have tried the suggested resolution by MichaelRandrup and am still having the same issue. I'm running Win7 SP1 x64 and MSDN VS 2012 Ultimate.
Posted by Microsoft on 2/27/2013 at 1:26 AM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Posted by MichaelRandrup on 2/27/2013 at 12:15 AM
Hi again.

I'm sorry I didn't take the screenshot. The problem is, that VS 2012 tries to open one or more of the HKEY_CLASSES_ROOT\VisualStudio.xxxx.11.0 keys, and get's a standard "Access Denied" error. The "Reproduce" steps isn't that simple either, because I have just installed VS 2012 and performed the normal Windows Updates on it, and it only seems to be an issue on some machines.

If you do a Bing Search, you can see many variations on the issue. For example:

1) This is the exact same VS2012 issue: http://connect.microsoft.com/VisualStudio/feedback/details/615347/requested-registry-access-is-not-allowed.
2) YouTube Video on the Issue: http://www.youtube.com/watch?v=vi9bL_gFRmg&feature=player_embedded.

I have, however, now found a "non-valid" workaround for the issue. It can be resolved in two steps:

Step 1: Replace the Owner of the keys under HKEY_CLASSES_ROOT
- Open regedit.exe
- Right-Click HKEY_CLASSES_ROOT and press "Permissions"
- Click on "Advanced"
- Click on the Owner Tab and make sure the "Administrators (<Machine Name>\Administrators)" is set as current owner
- Check the "Replace Owner on subcontainers and objects"
- Press OK

The owner is now replaced (even if it comes up with a warning, saying it could not replace on some objects.

Now if I right-click one of the faulty VisualStudio keys, and select permissions, I can see that only two users have permission on the key:
- "OWNER RIGHTS"
- "msiserver"

I think these owners are set during one of the Windows Updates, or maybe during installation, but they are obviously never replaced again with the proper permissions again - so there is the error in the Installer/updater!

Step 2: Replace the permissions of the keys under HKEY_CLASSES_ROOT
- Open regedit.exe
- Right-Click HKEY_CLASSES_ROOT and press "Permissions"
- I set the following users to have access:
--- Everyone - FULL
--- <Myself> - FULL
--- RESTRICTED - READ
--- <Machine name>\Administrators - FULL
--- <machine name>\Users - READ
- Click on "Advanced"
- Check the "Replace all child object permissions with inheritable permissions from this object"
- Press OK

Again, regedit might report a warning, but after this is done, the permissions on the faulty keys has been replaced, and VS 2012 now works again. The "non-valid" workaround will work with any of the Registry Access errors encounted in VS 2012, that I have come across on the internet.

It would be nice though, if someone could check why one or more of the VS2012 installers/updaters, replace the permissions on the registry keys with "OWNER RIGHTS" and "msiserver", but never resets the permissions back to the inherited ones. Since this problem isn't consistant on all machine, it must have something to do with other components installed on the faulty machines. I, for example, have VS 2010 Ultimate on my machine as well as other tools, etc.

Regards,
Michael








Posted by MichaelRandrup on 2/26/2013 at 10:45 PM
Hi Team.

Just wanted to give you a bit more information.

I have also tried to delete my user profile on the computer, and re-create it from scratch. This doesn't resolve the issue.
Uninstalling and re-installing VS 2012 does not work either, since the problem is in the HKEY_CLASSES_ROOT branch. I think the uninstaller also get an "Access Denied" when trying to delete the keys.

So.. I am really Stuck here, and cannot access our Source Control system from VS 2012!
Posted by Microsoft on 2/26/2013 at 1:19 AM
Thanks for reporting the issue.
In order to fix the issue, we must first reproduce the issue in our labs. We are unable to reproduce the issue with the steps you provided.

Can you create a screen shot and attach it to the bug? The easiest way to do this is to hit the PrtScn button on the keyboard, paste it into Microsoft Paint and save it as a .PNG file.

It may help if you provide us with:
a setup log file

You can get the log files with the following steps:
1) Download collect.exe from the link below. http://go.microsoft.com/?LinkId=8967043
2) You may choose to save the tool for later use, or to run directly.
3) The utility creates a compressed cabinet of all the VS and .NET logs to %TEMP%\vslogs.cab.

You can get more details about how to get the log files here:
http://blogs.msdn.com/heaths/archive/2008/05/09/visual-studio-and-net-log-collection-utility.aspx

Thanks again for your efforts and we look forward to hearing from you.
Microsoft Visual Studio Connect Support Team
Posted by Microsoft on 2/26/2013 at 12:50 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
MS VS 2012 Error Message.png 3/5/2013 21 KB
MS VS 2012 Error Message.png 3/5/2013 21 KB