最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

windows - Allow Visual Studio 2019 to access registry without running as Administrator? - Stack Overflow

programmeradmin1浏览0评论

I develop some Outlook AddIn in VB.NET in Visual Studio 2019 (needed for backward compatibility) and therefore, the IDE is writing and modifying Registry keys in HKEY_CLASSES_ROOT, HKEY_LOCAL_MACHINE and others(?).

So I used to run Visual Studio as Administrator. But this is interferring badly with my Cygwin installation with git and makefiles as all files become owned by Administrator and therefore are no longer fully accessible by the Cygwin shell and the normal login-user.

I tried with a manifest file for devenv.exe for getting higher privileges under the regular user, but it was ignored by the IDE (living at the same folder, no clue why it was completely ignored).

I tried giving full access to my user for the above registry entry points, but it still does not work.

How can I solve my issue? Either let Visual Studio run as Administrator but do not change files ownership and permissions or run Visual Studio as normal user and grant full access to the registry?

Error is:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4795,5): 
error MSB3213: 
Cannot register type library "C:\git\outlook_addin\src\bin\regifyOLAddIn.tlb". 
Error accessing the OLE registry. 
(Exception from HRESULT: 0x8002801C (TYPE_E_REGISTRYACCESS))

Any hints on that?

发布评论

评论列表(0)

  1. 暂无评论