windows 您可以在没有管理员权限的情况下在 IE 中安装 ActiveX 控件吗?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/338657/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 11:42:13  来源:igfitidea点击:

Can you install an ActiveX control in IE without having administrator privileges?

windowsinternet-exploreractivex

提问by Ferruccio

I'm working on a web app that needs an ActiveX control to function. It installs just fine when the user has admin privileges, but fails to load otherwise. Is this by design and if so, is this documented somewhere? (preferably MSDN)

我正在开发一个需要 ActiveX 控件才能运行的 Web 应用程序。当用户具有管理员权限时,它安装得很好,但否则无法加载。这是设计使然,如果是这样,这是否在某处记录?(最好是 MSDN)

采纳答案by taxilian

Actually, none of these answers are completely correct; if you install an ActiveX control in a per-user basis it will work just fine without Administrative privileges, regardless of the group that the user is in. Bascially this involves installing it to HKEY_CURRENT_USER instead of HKEY_LOCAL_MACHINE.

实际上,这些答案都不是完全正确的。如果您在每个用户的基础上安装 ActiveX 控件,它在没有管理权限的情况下也能正常工作,无论用户所在的组如何。基本上,这涉及将其安装到 HKEY_CURRENT_USER 而不是 HKEY_LOCAL_MACHINE。

Depending on what your activex control is written in this may be easy or it may be hard to change; with ATL 9 it's pretty easy, as you just have to call a function:

根据您的 Activex 控件的编写内容,这可能很容易,也可能很难更改;使用 ATL 9 非常简单,因为你只需要调用一个函数:

AtlSetPerUserRegistration(perUser);

FireBreathdoes this by default so that admin privileges aren't neccesary to install the plugin/control; it also has a workaround for older versions of ATL(ATL 9 is VS 2008). This is all C++, so if your control is written in something else I don't know how to fix it, but that should at least get you started.

FireBreath默认执行此操作,因此安装插件/控件不需要管理员权限;它还为旧版本的 ATL提供了解决方法(ATL 9 是 VS 2008)。这都是 C++,所以如果你的控件是用别的东西写的,我不知道如何修复它,但这至少应该让你开始。

回答by BenAlabaster

Complex answer: Yes.The user's account needs to be part of a group that affords the privelege of registering libraries (dll) or controls (ocx) or needs to be directly assigned the privelege.

复杂的答案:是的。用户帐户需要是提供注册库 (dll) 或控件 (ocx) 特权的组的一部分,或者需要直接分配特权。

Simple answer: No.Only accounts with the administrative privelege to install OCXs or DLLs can install Active-X controls (by defaultthose accounts are part of the Administrators, Domain Administrators or Power Users groups).

简单回答:不可以只有具有安装 OCX 或 DLL 的管理权限的帐户才能安装 Active-X 控件(默认情况下,这些帐户属于管理员、域管理员或高级用户组)。

Edit: I guess this question was changed... Yes, this is by design.

编辑:我想这个问题已经改变了......是的,这是设计使然。

回答by Matt