none
Does VS 2010 need to be run as an administrator on Windows 7?

    Question

  • I'm getting the error on my builds of:

    Error 562 Cannot register assembly "C:\src\version9\AutoTag\AutoTag2003\bin\Debug\AutoTag2003.dll" - access denied. Please make sure you're running the application as administrator. Access to the registry key 'HKEY_CLASSES_ROOT\AutoTag2003.Connect' is denied. AutoTag2003


    Very funny video - Reporting as a Metaphor
    Friday, May 28, 2010 10:13 PM

Answers

  • Hi David,

    Generally speaking, "access denied" means that the rights is not enough for accessing. It seems that you don't have sufficient privileges to register the assembly AutoTag2003.dll. Is it a COM dll written by you?

    Based on your description, it seems that you receive this error message when you register any COM dll.

    Referring to the user rights and Visual Studio, user permission requirements for Visual Studio vary depending on the operating system and the Visual Studio version.

    On Windows Vista or Windows 7, most features and tasks can be completed without administrator permissions. If an operation does require elevated permissions, a message box will appear. In these instances, you may be prompted to restart Visual Studio 2008 with administrator permission to complete the task.
    For more information, please check: http://msdn.microsoft.com/en-us/library/ms165100.aspx (It is also apply for VS2010)

    Could you please help me to check the following two points?

    - Check your user account that you are logged in as Administrator
    - Visual Studio 2010 should be run with administrator privileges - Right-click the installer >> "Run as Administrator")

    Hope this helps! If you have any concern, please feel free to let me know.

    Best regards,
    Yichun Chen
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by YiChun Chen Tuesday, June 01, 2010 6:12 AM
    Monday, May 31, 2010 9:03 AM

All replies

  • Not in my experience.

    Is there anything "unique" in your project that might cause this? What happens when you try to build other projects?

     

    Saturday, May 29, 2010 1:52 PM
  • I'm getting the error on my builds of:

    Error 562 Cannot register assembly "C:\src\version9\AutoTag\AutoTag2003\bin\Debug\AutoTag2003.dll" - access denied. Please make sure you're running the application as administrator. Access to the registry key 'HKEY_CLASSES_ROOT\AutoTag2003.Connect' is denied. AutoTag2003


    Very funny video - Reporting as a Metaphor


    VS 2010 should not required administrator account permissions.

    As it is project build issue. Try to give modify access permission to the folder for the user which runs the VS IDE.


    Raman Katwal
    Sunday, May 30, 2010 12:23 PM
  • I get this on every DLL set to register as a COM app as part of the build. Any project that does not register as a COM app builds fine without admin rights.

    ??? - thanks - dave


    Very funny video - Reporting as a Metaphor
    Sunday, May 30, 2010 4:04 PM
  • Hi;

    The problem is not a folder access, it's registry access for registering the build DLL as a COM app.

    ??? - thanks - dave


    Very funny video - Reporting as a Metaphor
    Sunday, May 30, 2010 4:04 PM
  • Hi David,

    Generally speaking, "access denied" means that the rights is not enough for accessing. It seems that you don't have sufficient privileges to register the assembly AutoTag2003.dll. Is it a COM dll written by you?

    Based on your description, it seems that you receive this error message when you register any COM dll.

    Referring to the user rights and Visual Studio, user permission requirements for Visual Studio vary depending on the operating system and the Visual Studio version.

    On Windows Vista or Windows 7, most features and tasks can be completed without administrator permissions. If an operation does require elevated permissions, a message box will appear. In these instances, you may be prompted to restart Visual Studio 2008 with administrator permission to complete the task.
    For more information, please check: http://msdn.microsoft.com/en-us/library/ms165100.aspx (It is also apply for VS2010)

    Could you please help me to check the following two points?

    - Check your user account that you are logged in as Administrator
    - Visual Studio 2010 should be run with administrator privileges - Right-click the installer >> "Run as Administrator")

    Hope this helps! If you have any concern, please feel free to let me know.

    Best regards,
    Yichun Chen
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by YiChun Chen Tuesday, June 01, 2010 6:12 AM
    Monday, May 31, 2010 9:03 AM
  • Hi;

    Yes my login has local admin rights and once I set VS 2010 to run with administrator privileges the COM registration works. I was told in another thread that COM registration requires admin privileges.

    So I guess the answer is if you are writing a COM app, you need to run with admin rights. Not a biggie - I think I'll just set Windows 7 to run everything with admin rights - never had a reason to regret that with XP.

    thanks - dave


    Very funny video - Reporting as a Metaphor
    Monday, May 31, 2010 7:24 PM
  • Hi David,

    You're welcome.

    As we know, UAC is introduced from Windows Vista. It is the technology and security infrastructure introduced with Microsoft's Windows Vista, Windows Server 2008 and Windows 7 operating system. It aims to improve the security of Microsoft Windows by limiting application software to standard user privileges until an administrator authorizes an increase or elevation. We don't have this feature in Windows XP.
    For more information on UAC, please see: http://technet.microsoft.com/en-us/library/cc709691%28WS.10%29.aspx

    That's why we might face this situation.

    I'm so glad to hear that you can register the COM dll with administrator privileges.

    Have a nice week!

    Best regards,
    Yichun Chen
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Tuesday, June 01, 2010 6:11 AM
  • Yeah I hate UAC - I just turned it off. In 8(?) years of using XP I never had an issue where UAC would have protected me.

    thanks - dave


    Very funny video - Reporting as a Metaphor
    Tuesday, June 01, 2010 3:18 PM
  • hey David, though you logged in as administrator In windows 7 or Vista you need admin rights to write inside system folders and also to register COM objects. Try this, On your VS2008 Icon Right Click - Properties - Shortcut - Advance - Check Run as administrator. Say OK this should work for you. If not,try the following Properties - Compatibility tab - Privilege Level - Check Run this program as an administrator and also click Change setting for all users button - again Check Run this program as an administrator under Privilege Level. This should work for you I got it registered this way am using Windows 7. Thanks Guys for all your valid informations
    Tuesday, June 08, 2010 6:47 AM
  • Yep, did that too. I think the way to use Windows 7 is turn off UAC and run all apps as an administrator. Then their security checking works :)
    Very funny video - Reporting as a Metaphor
    Tuesday, June 08, 2010 2:29 PM
  • DavidThi808.

    I couldn't agree more. Let's face it. I live alone. No one is going to bother with my security other than Microsoft. Besides, I want choice in the matter. Microsoft feels that people should have no choice. I'm very angry over the reduced options and am ready to go back to vista.

    Renee

    Friday, June 18, 2010 5:36 AM
  • the whole thing from A to Z is so broken at every level
    Thursday, January 23, 2014 11:57 AM