Can I run RegAsm without being Administrator?

后端 未结 5 1259
醉话见心
醉话见心 2021-02-03 12:11

My coworker is trying to register some COM components (which I wrote) via RegAsm.exe and it says he needs Administrator privileges. His account has admin privileges but he is n

5条回答
  •  滥情空心
    2021-02-03 12:25

    Why don't you use registration free com? Its only been supported since 2003 and obviates the need for UAC / administrative access to install COM components.

    With RegFree COM you can just bundle the COM dlls with the application that uses them as a private assembly - but that doesn't mean they can't be properly installed - either in the registry or in WinSxS by the final deployment install.exe/msi


    Subtext wrt the actual query: no - COM registration is in the HKEY_LOCAL_MACHINE key that always requires administrative access.


    I lied: Actually you can. If you create a application with no manifest at all, Windows deduces that its an XP era application that expects administrative access to run and will activate a compatibility mode that, amongst other features, redirects write access to HKLM to a writable location under HKCU. So the COM component registration "succeeds" - but is registered for the current user only.

    Im not sure why the ability to register for just the current account isn't supported generally outside the compatibility framework.

提交回复
热议问题