从网页按用户安装 OCX

发布于 2024-12-04 23:01:36 字数 388 浏览 2 评论 0原文

我们有一个包含自定义 OCX activex 的网页。 ActiveX 已签名,并且该证书受到公司中每台计算机的信任,并且所有计算机都运行 Windows 7 和 IE8。

但是,当用户第一次打开网页时,UAC 弹出窗口会提示需要管理权限。据我们所知,OCX 正在尝试为计算机的所有用户将自身安装在“C:\Windows\Downloaded Program Files”目录中,这需要管理权限。

问题是,有没有办法在网页上配置activex以按用户安装,以便域的任何用户都可以自己启动它?

我们可以在计算机上运行一些脚本并为所有用户安装 activex,但这对我们不起作用,因为我们计划拥有更多的 activex 控件,并且每个控件都有多个版本。

感谢您的帮助!

We have a web page that includes a custom OCX activex. The activex is signed and the certificate is trusted by every computer in the company, and all computers run Windows 7 and IE8.

However, when a user opens the web page for the first time, the UAC popup prompts for administrative privileges. From what we are able to tell, the OCX is trying to install itself for all users of the computer in "C:\Windows\Downloaded Program Files" directory, and that requires administrative privileges.

The question is, is there a way to configure the activex on the web page to install per-user, so that any user of the domain is able to launch it by himself?

We could run some scripts on the computers and install the activex for all users, but that doesn't work for us, as we are planning to have many more activex controls and each will have multiple versions.

Thanks for your help!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

魔法唧唧 2024-12-11 23:01:36

(很老的q,但我刚刚经历过这个)

如果您自己控制ActiveX控件,或者可以将其重新打包到新的签名CAB文件中,您可以修改.INF文件以将其设置为每个用户,这将安装它进入用户的个人资料。

参见http://msdn.microsoft.com/en- us/library/dd433049(v=VS.85).aspx

示例 INF 如下(可能仍有不需要的条目):

[version]
signature="$CHICAGO$"
AdvancedINF=2.0

[DefaultInstall]
CopyFiles=install.files

[RInstallApplicationFiles]
CopyFiles=install.files
RegisterOCXs=RegisterFiles
AddReg=AddToRegistry

[DestinationDirs]
install.files=11

[SourceDisksNames]
1=%DiskName%,MyControl.CAB,1

[Add.Code]
MyControl.ocx=MyControl.ocx
MSWINSCK.ocx=MSWINSCK.ocx

[install.files]
MyControl.ocx=MyControl.ocx
MSWINSCK.ocx=MSWINSCK.ocx

[SourceDisksFiles]
MyControl.ocx=1
MSWINSCK.ocx=1

[MyControl.ocx]
file-win32-x86=thiscab
RegisterServer=yes
clsid={ACCD6812-5384-4B4F-A155-000000000000}
DestDir= 
FileVersion=1,0,0,0
RedirectToHKCU=yes

[MSWINSCK.ocx]
file-win32-x86=thiscab
RegisterServer=yes
clsid={248DD896-BB45-11CF-9ABC-0080C7E7B78D}
DestDir=
FileVersion=6,1,98,17
RedirectToHKCU=yes

[Deployment]
InstallScope=User|Machine

(very old q, but I just went through this)

If you control the ActiveX control yourself, or can repackage it into a new signed CAB file, you can modify the .INF file for it to be per-user, which will install it into the user's profile.

cf. http://msdn.microsoft.com/en-us/library/dd433049(v=VS.85).aspx

Sample INF follows (may have unneeded entries still):

[version]
signature="$CHICAGO$"
AdvancedINF=2.0

[DefaultInstall]
CopyFiles=install.files

[RInstallApplicationFiles]
CopyFiles=install.files
RegisterOCXs=RegisterFiles
AddReg=AddToRegistry

[DestinationDirs]
install.files=11

[SourceDisksNames]
1=%DiskName%,MyControl.CAB,1

[Add.Code]
MyControl.ocx=MyControl.ocx
MSWINSCK.ocx=MSWINSCK.ocx

[install.files]
MyControl.ocx=MyControl.ocx
MSWINSCK.ocx=MSWINSCK.ocx

[SourceDisksFiles]
MyControl.ocx=1
MSWINSCK.ocx=1

[MyControl.ocx]
file-win32-x86=thiscab
RegisterServer=yes
clsid={ACCD6812-5384-4B4F-A155-000000000000}
DestDir= 
FileVersion=1,0,0,0
RedirectToHKCU=yes

[MSWINSCK.ocx]
file-win32-x86=thiscab
RegisterServer=yes
clsid={248DD896-BB45-11CF-9ABC-0080C7E7B78D}
DestDir=
FileVersion=6,1,98,17
RedirectToHKCU=yes

[Deployment]
InstallScope=User|Machine
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文