locked
Requested registry access is not allowed RRS feed

  • Question

  • I have inherited a project from someone who no longer works here.  I see how the debugger works in Visual Studio.

    My computer has Visual Studio 2012 running on Windows 7.  The computer where are application was created runs Visual Studio 2010 on Windows XP.

    The program runs in debug mode on the XP computer without any problems.

    On my computer it always gets an exception at the point where the registry is accessed.

    I have executed the following:

    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.


    I have also executed:

    1. Press WINDOW+R to open the Run window, type "regedit" (no quotes) and press ENTER to execute. If a UAC dialog appears choose Yes to open the Registry Editor with elevated priveledges. 2. Navigate to HKEY_CURRENT_USER\Software\Classes. 3. Create a new key named ".vbproj" 4. Run VS 2010 as an administrator. 5. Try creating a VB project.

    Neither fix works for me.

    • Moved by Amanda Zhu Wednesday, October 22, 2014 9:45 AM
    Wednesday, October 15, 2014 10:48 PM

Answers

  • Hi PClift,

    Thank you for your response.

    You got the registry error when you debugged the WPF application, so your issue is not related to visual studio tests. You know this forum is to discuss Visual Studio test issues. For your issue, I suggest consulting it on Visual Studio Debugger forum: https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vsdebug, you will get better solutions from VS debugger experts in that forum.

    Thank you for your understanding.

    Have a nice dayJ


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Just Karl Wednesday, May 6, 2015 5:12 PM
    Tuesday, October 21, 2014 1:58 AM

All replies

  • Hi PClif,

    Could you tell use more information in order to resolve your issue?

    What type of project/application are you running on your machine? Visual Basic Windows Forms application? Other Visual Basic project?

    Whether can the project be built successfully?

    Based on what you executed, it seems that you got the same error when created a new VB project and run the VB project, right?

    I searched the error message and find this thread: https://social.msdn.microsoft.com/Forums/en-US/a7c2aee4-9c30-42f5-b8c2-945960bad49e/requested-registry-access-is-not-allowed?forum=Vsexpressvb

    If you have the similar issue with that thread above, please try Blackwood’s answer such as disabling User Access Controls (UAC) on your computer in that thread.

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Amanda Zhu Monday, October 20, 2014 1:36 AM
    Thursday, October 16, 2014 8:09 AM
  • the project is using C#, WPF.  The project can be built successfully and does run on any computer.  The only time I get the registry error is when I try to use the debug feature.  It always jumps to the exception.

    The code is:

                #region read data folder location from registry

                try

                {

                    regKey = hklm.OpenSubKey("Software\\ThermoGenesis\\XpressTRAK\\Data", true);

                    if (regKey.GetValue("DataFolderPath") == null)

                    {

                        GVariables.dataFolderDir = System.IO.Directory.GetParent(

                                System.Reflection.Assembly.GetExecutingAssembly().Location).ToString();

                        //create the key

                        regKey.SetValue("DataFolderPath", GVariables.dataFolderDir);

                    }

                    else

                    {

                        GVariables.dataFolderDir = Convert.ToString(

                            regKey.GetValue("DataFolderPath"));

                    }

                }

                catch (Exception ex)

                {

                    MessageBox.Show(ex.Message, GVariables.msgCaption);

                    if (regKey != null)

                        regKey.Close();

                    return false;

                }

                #endregion

     

    Monday, October 20, 2014 4:33 PM
  • FYI: The user access controls have been off on my computer for a long time, so that does not solve the problem.
    Monday, October 20, 2014 5:15 PM
  • Hi PClift,

    Thank you for your response.

    You got the registry error when you debugged the WPF application, so your issue is not related to visual studio tests. You know this forum is to discuss Visual Studio test issues. For your issue, I suggest consulting it on Visual Studio Debugger forum: https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vsdebug, you will get better solutions from VS debugger experts in that forum.

    Thank you for your understanding.

    Have a nice dayJ


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Just Karl Wednesday, May 6, 2015 5:12 PM
    Tuesday, October 21, 2014 1:58 AM
  • Hi PClift,

    Since your post this issue on VS debugger forum: https://social.msdn.microsoft.com/Forums/vstudio/en-US/3c1feb53-2841-4fea-a8d6-3b135b9f6660/requested-registry-access-is-not-allowed?forum=vsdebug#3c1feb53-2841-4fea-a8d6-3b135b9f6660, I will move this thread to off-topic forum.

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, October 22, 2014 9:45 AM
  • I do not understand!

    You are from Microsoft and you can not get an answer?

    I feel like I am going in circles posting this to the world and the people who know the answer do not care.

    Thursday, October 23, 2014 1:05 AM