locked
Vista WPFApplication "Requested registry access is not allowed" RRS feed

  • Question

  • This relates to my previous post at

    http://forums.microsoft.com/msdn/showpost.aspx?postid=1502561&siteid=1

     

    Basically it comes down to me not being able to create a WPFApplication as a new project.

    It comes up with the error "Requested registry access is not allowed".

    From a search, I had seen it was a problem for previous versions and what I've noticed is that when selecting any of the HKCR\VBExpress.*9* registry entries, it comes up with "Access is denied".

     

    Nathan

    Saturday, April 21, 2007 6:17 AM

Answers

  • There is a quick fix for this and any other permission issues that occur with Vista. I've seen this happen with several different installs under Vista including VS 2005 and Orcas. The problem is for some reason regisry permissions are given to the user msiserver. You can reset each entry manually, but that is a major pain. It's much easier just to fix the entire registry by using the SubInACL utility. Basically, you can use the utility to add administrator permissions to every key in the registry.

     

    1. Download and install the SubInACL utility.

    2.Create a new text file named fix_registry_permissions.cmd and add the following text to it and save it.

    cd /d "%programfiles%\Windows Resource Kits\Tools"
    subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f /grant=system=f
    subinacl /subkeyreg HKEY_CURRENT_USER /grant=administrators=f /grant=system=f
    subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f /grant=system=f
    subinacl /subdirectories %SystemDrive% /grant=administrators=f /grant=system=f
    subinacl /subdirectories %windir%\*.* /grant=administrators=f /grant=system=f

     

    3. Run the file by double-clicking on it.

     

    That's it. It will take several minutes to finish, but at the end all registry keys will be accessable to the administrator and system, as it should be.

     

     

     

    Sunday, May 13, 2007 12:03 AM

All replies

  • There is a quick fix for this and any other permission issues that occur with Vista. I've seen this happen with several different installs under Vista including VS 2005 and Orcas. The problem is for some reason regisry permissions are given to the user msiserver. You can reset each entry manually, but that is a major pain. It's much easier just to fix the entire registry by using the SubInACL utility. Basically, you can use the utility to add administrator permissions to every key in the registry.

     

    1. Download and install the SubInACL utility.

    2.Create a new text file named fix_registry_permissions.cmd and add the following text to it and save it.

    cd /d "%programfiles%\Windows Resource Kits\Tools"
    subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f /grant=system=f
    subinacl /subkeyreg HKEY_CURRENT_USER /grant=administrators=f /grant=system=f
    subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f /grant=system=f
    subinacl /subdirectories %SystemDrive% /grant=administrators=f /grant=system=f
    subinacl /subdirectories %windir%\*.* /grant=administrators=f /grant=system=f

     

    3. Run the file by double-clicking on it.

     

    That's it. It will take several minutes to finish, but at the end all registry keys will be accessable to the administrator and system, as it should be.

     

     

     

    Sunday, May 13, 2007 12:03 AM
  • Thanks Michael. I'll have to remember this the next time it occurs.

    I just ended up reinstalling Vista and all was well (and even better).

    I'm just assuming the steps you laid out would have fixed my issue, but obviously there is a root cause that makes it happen in the first place that needs to be examined.

     

    Thanks,

    Nathan

    Sunday, May 13, 2007 7:07 AM
  • Done:    57500, Modified    51713, Failed     5786, Syntax errors        0
    Last Done  : HKEY_CLASSES_ROOT\Interface\{5F8A7021-CD1C-31BA-8496-BB8EB6AE7CD0}\
    Last Failed: HKEY_CLASSES_ROOT\Interface\{5F894E5B-1E39-4778-8E23-9ABAD9F0E08C}

    Thursday, June 7, 2007 8:45 AM
  • failed to install first time. second time went fine. then ran the cmd. able to make various registry changes now w/o a glitch. thks. -l
    Monday, June 25, 2007 4:46 AM
  •  

    Sorry for this bump, but I have this same problem. This fixed it but it caused many other things to stop working. I was wondering if there is a way for this just to run on the VS 2005.
    Saturday, July 28, 2007 2:08 AM
  • This works great! The key is that you can't simply double click on the new .cmd file. Instead, you have to run it as administrator. Start CMD with elevated permissions (Ctrl-Enter when you run it) and then type in the cmd file name you created from above.

     

    Thursday, September 6, 2007 8:31 PM

  • This is not woking propertly, becouse if run this cmd fie you are not have sound in the PC and network have see

    this not good


    Saturday, September 15, 2007 11:17 AM
  •  Michael G. Emmons wrote:

    There is a quick fix for this and any other permission issues that occur with Vista. I've seen this happen with several different installs under Vista including VS 2005 and Orcas. The problem is for some reason regisry permissions are given to the user msiserver. You can reset each entry manually, but that is a major pain. It's much easier just to fix the entire registry by using the SubInACL utility. Basically, you can use the utility to add administrator permissions to every key in the registry.

     

    1. Download and install the SubInACL utility.

    2.Create a new text file named fix_registry_permissions.cmd and add the following text to it and save it.

    cd /d "%programfiles%\Windows Resource Kits\Tools"
    subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f /grant=system=f
    subinacl /subkeyreg HKEY_CURRENT_USER /grant=administrators=f /grant=system=f
    subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f /grant=system=f
    subinacl /subdirectories %SystemDrive% /grant=administrators=f /grant=system=f
    subinacl /subdirectories %windir%\*.* /grant=administrators=f /grant=system=f

     

    3. Run the file by double-clicking on it.

     

    That's it. It will take several minutes to finish, but at the end all registry keys will be accessable to the administrator and system, as it should be.

     

     

     



    Just as a side note for people inexperience with this type of stuff, watching this cmd execute is quite scary.
    But just run it and go downstairs and make your self a cup of tea.
    Possibly drink it too downstairs as it takes a while to complete.
    Smile
    Tuesday, September 18, 2007 9:41 PM
  • I could possibly have done this incorrectly, but after running this cmd my computer's functionality was reduced to something similar to that of the "black screen of death" except for the fact that I still had internet access. A system restore was able to fix that. Unfortunately, I'm still having the issue of not being able to create a new Windows Application project file.
    Wednesday, September 19, 2007 4:51 PM
  • Just in case anyone's still having this issue, I did find a quick and simple solution.

    1. Click Start, and then click Run.
    2. In the Open text box, type regedit.
    3. Locate the following registry subkey:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application
    4. Right-click the Application subkey, point to New, and then click Key.
    5. Type TEST for the key name.
    6. Close Registry Editor.

    This was taken from a post found at http://forums.asp.net/p/930381/1089440.aspx .
    Wednesday, September 19, 2007 5:21 PM
  •  

    I'm having the same problem, when I try to create any type of project (VS 2008 Beta 2) I get the same error message. Michael, I tried your suggestion but that did not help Sad Does anyone have any other suggestions? I'm running Vista Ultimate x86. Thanks in advanced.

    Thursday, September 20, 2007 1:13 AM
  • Me too having the same problem but not that I'm an idiot or anything (really I'm not!) , I can even get through the 1st part of this fix.  The downloadable isnt SubInACL utility file was downloaded fine, but when I tried to install it says that I have another one running, which I did not...

     

    THEN, the second part I don't have c:/programfiles/Window Resource Kits in my directory...

    Um, maybe I will try the other registry fix, but if anyone else has any bright ideas I'm all opened - otherwise I'll just keep using Visual C #  2005. , I was all excited to start working with Visual C# 2008 today...HEHEHE.

     

    Thanks in advance!

    YoonMi

    Friday, October 5, 2007 9:59 PM
  • UM, not I have massive problems...

     

    Hope someone can help, pleazzzzzzzzzzzzze!

     

    Ok so after I finally figured out how to do this registry fix - I thought great; it worked...but not so fast!

    Yes, in fact I'm not able to create projects in Visual C# Express 2008 now, BUT

     

    After some time my computer was acting funny so I re-booted, NOW I've lost my sound; Windows Audio Service (my speakers work just fine), my computer no longer can tell me what Processor or Ram I have, The Windows Security Center can not find my anti-virus program, even though it shows it on and working, properly.  Windows can find any updates; although I know my computer is updated...it can't even find the means to get new updates.  NOR can I even do a System Restore; it says I don't have enough memory.  Please tell me what went wrong, well don't tell me what went wrong just can some one advise me on how to get my computer back to the state it was in before this 'registry fix', NO WONDER why you said it's going to be scary so walk away and have yourself a cup of tea or better yet have a drink.  Before this nights over I will certainly do that.

     

     

    Saturday, October 6, 2007 1:57 AM
  • OK so that was a nightmare, I won't soon wish to have again...

     

    Anyway, for me running this registry fix meant losing EVERYTHING; this registry destroyed my Audio driver (or something), and a few other things. 

     

    After trying to fix the load of errors (all night) I quickly realized that that's when the nightmare would begin.  I had to restore using my bootable cd that came with the computer.  Then load all my programs and finally re-install Windows Vista 32-bit. 

     

    I still have no sound and programs that I need to load from a disk which is MS Office, QuickBooks, Mouse, and Printer Software - I can't;  programs will start to run then say there's already a verison installing please quit the program and restart your computer - then try to re-install --- HA! No such lucky...

     

    ANYONE know how to get the original Vista Registry to fix these problems? Not that I want to screw with the registry anymore BUT I will try anything at this point to get back up and running in a similar fashion prior to this registry...

    Saturday, October 6, 2007 7:54 PM
  • Wow... what is the fix to the lost sound?
    Friday, October 12, 2007 5:56 PM
  • More problems with that script, it ran successfully and without errors, but on restarting I was experiencing insufficient disk space errors (despite having a good ~40GB free) and networking and audio services had utterly vanished. Only way out of the situation was to boot from the Vista DVD and System Restore (as apparently there wasn't enough disk space for restore inside the OS). Oh and the restore took about fifty minutes. Need to find another solution methinks...
    Sunday, October 14, 2007 5:41 AM
  • All hail me, I repaid the Network and Sound problems.

    Backup you registry (google for it) on an external device and don't be an idiot like you where the last time.

    Start regedit
    right click HKEY_CLASSES_ROOT -> Permissions
    Click Add...
    Click Advanced...
    Click Find Now
    Select "Users" and Click "OK"
    Again "OK"
    Give Users "Full Control"
    Click "OK", wait a few second as this can take a while, like in 30 second up to 10 minutes

    Reboot and cross your fingers.

    In my case the system started perfect with sound, however some functions like system restore doesn't seem to work and I get the feeling its a little bit slower.

    Wednesday, November 7, 2007 11:14 PM
  • so what the hell does

    [code]

    /grant=administrators=f /grant=system=f

    [/code]

     

    do?

    Saturday, November 24, 2007 1:02 PM
  • I came across this issue with Visual Studio 2010 and Windows 7.  I did not find this problems source as of yet but, I have found many Visual Studio users encountering it. I tried Michael's solution to this problem and it did more damage then anything else. It even went as far as to make Visual studio to boot into "Shell mode" and tell me the registration was not valid.

    Using System Restore I rolled back the changes made by the subinacl tool and Michaels script (it probably was not meant for Windows 7, causing the errors in the first place) .

    being a long time visual studio user and a pretty good trouble shooter, I knew the subinacl was the proper tool to correct the problem, but the script was incorrect for my perticular setup.  I adjusted the script as follows:

    cd /d "%programfiles% (x86)\Windows Resource Kits\Tools"

    subinacl /subkeyreg HKEY_CLASSES_ROOT\VisualStudio* /setowner=domain\user
    subinacl /subkeyreg HKEY_CLASSES_ROOT\VisualStudio* /grant=everyone=f  /grant=administrators=f /grant=system=f

    pause

    I tried to include the "setowner" command with the grant commands (on the same line) but it would throw errors all the time.

    This script fixed MY "Requested registry access is not allowed" with Windows 7 and Visual Studio 2010.

    if you want to try this script: Follow Michael's instructions, but use the script provided in this post and replace the "domain\user" with the proper credentials. You may also need to change the Path of Windows Resource Kits if you installed it in a diffrnet place or are not using a 64 bit OS.  Before using this script please backup your registry.

     

    cheers!

    Thursday, July 1, 2010 5:49 AM
  • Hi hall, i just have one question, when i run your script. in VisualStudio*... says 1 Change but say some like this: Unable to enumerate subkeys bla bla.... that's normal?; in this moment im thinking launch my computer against the wall of my room becouse, VS2010 keep saying ACCESS DENEYED!!!!... i need make somthing else??? Thanks.

     

    Edit, i remove the PAUSE function from script, and after a time works fine.

    • Edited by Pwned Wednesday, July 21, 2010 2:10 PM worked.
    Wednesday, July 21, 2010 12:28 PM
  • All hail me, I repaid the Network and Sound problems.

    Backup you registry (google for it) on an external device and don't be an idiot like you where the last time.

    Start regedit
    right click HKEY_CLASSES_ROOT -> Permissions
    Click Add...
    Click Advanced...
    Click Find Now
    Select "Users" and Click "OK"
    Again "OK"
    Give Users "Full Control"
    Click "OK", wait a few second as this can take a while, like in 30 second up to 10 minutes

    Reboot and cross your fingers.

    In my case the system started perfect with sound, however some functions like system restore doesn't seem to work and I get the feeling its a little bit slower.


    The above fix worked for me. Sound and other functions were restored but system was very slow. I found a fix for this as well. The registry key for managing memory paging was meesed up. Fixed by the following procedure:

    1. Start the Registry Editor.From the Windows Start menu, select Run. In the Run box, type regedit and click OK.

    2. In the Registry Editor, locate the following key:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management

     

    3. Next, double-click the Systempages entry and enter a value of “ffffffff” (8) in the Edit DWORD Value dialogbox

    4. Click OK and then close the Registry Editor.

    5. Reboot.

    Regards,

    the_cnc_guy

     

    Thursday, August 5, 2010 3:50 AM