{guid} cannot be opened. An error is preventing this key from being opened. Details: Access is denied.

Here’s the setup. I’m not a fan of virtual machines so I tend to install stuff on the metal. My laptop is my sandbox and test machine, I’m running 64bit Windows 7 Enterprise N. A wee while ago I had maybe half a dozen SQL Server instances installed, ranging from 2008, 2008 R2 and Denali CTP3, even express. All the services were set to manual start and I only ever fired up what I needed. I also had some SSIS, SSAS and SSRS components. Alongside that I had an Visual Studio 2010 Web Developer express edition and I think one other Visual Studio 2010 cut down edition, and of course all the BIDS tools (2010 & 2008) from the SQL Servers. Bit of a crazy set up I know, and the virtual machine devotees are rolling their eyes, but it worked.

Until the Denali CTP evaluation period expired. Firstly all my file associations were screwed up – but that’s a pretty easy workaround/fix. Next thing my SSIS packages wouldn’t work in the VS 2010 shell because Denali was gone, and they wouldn’t work in the 2008 shell because they wouldn’t downgrade. I spent some time trying to rebuild the solutions from the XML components but I was getting errors that seemed to indicate version conflicts.

So … time to clean house. Uninstall anything and everything that looked like SQL Server or Visual Studio. This ended up being a bit messy because I didn’t have all the original install media. So a quick download of msicuu2.exe cleaned out all the components.

Time for a clean new install of SQL Server 2008R2. Running through the installer I got through all the rule checks and into the installation when up popped an error to do with permissions on a nasty GUID\GUID registry key.

The location was HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\…

There are heaps of keys in this folder, all guids, and many with subkeys, also guids. Running Regedit as an administrator (or disabling the UAC), and backing up the registry before beginning I found the one from the installer error and I got this error:

“{guid}\{guid} cannot be opened. An error is preventing this key from being opened. Details: Access is denied.”

This was fixed by right clicking. Select permissions. Click add and navigate the AD to a suitable administrator account. Click advanced. Select the owners tab. Select the admin account and click apply. Click OK. Done.

The problem for me was that there were hundreds of these keys, and when I tried to apply the permissions to the parent folder and push down to the sub-folders I received an error.

After much trial and error, I found a fix. I don’t quite know how it worked but it did. My sys admin later mentioned that it was something to do with underlying DOS commands… It worked, it helped me, maybe one day it might help someone else…

On the parent key, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\, follow the steps above up to clicking on the advanced button.

On the permissions tab check “Replace all child object permissions with inheritable permissions from this object”, then press the “Apply” button. Click ok, and ok any errors.

On the owners tab select the admin account and apply. Ok any dialogs or errors.

Now here is the kicker. Don’t click ok on the advanced dialog, instead repeat the above two steps. This time you shouldn’t get any errors and all the child permissions should be altered.

Now I have a crisp working install of SQL Server 2008 R2 with BIDS, SSIS, SSAS & SSRS, and all my old packages are available and working.

This entry was posted in SQL Server. Bookmark the permalink.

3 Responses to {guid} cannot be opened. An error is preventing this key from being opened. Details: Access is denied.

  1. doug says:

    Many thanks! This info saved me a lot of grief today.

  2. Ty says:

    You rock sir!

  3. Nathan says:

    Thank you very much for this information. You just saved me a few hours of further time down the drain. Sure wish I found this an hour ago.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s