windows 手动安装 ActiveX 组件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1777930/
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
Manually Installing ActiveX component
提问by mrduclaw
I'm trying to view a surveillance camera system. The remote access is available through a website, and that website seems to need to download a CAB file full of goodies to let me view the cameras.
我正在尝试查看监控摄像系统。可以通过网站进行远程访问,该网站似乎需要下载一个充满好东西的 CAB 文件才能让我查看摄像机。
On some of my systems this install process goes over nicely.
在我的某些系统上,此安装过程进行得很好。
On a few, particuarly the ones with slower Internet, I get into an endless-loop of: going to the page, waiting a long period of time (I assume this is where its downloading the CAB file), clicking yellow bar to allow it to "Install this CAB file for all Users" and the page reloading. It never pops up with the Window saying "Are you sure its cool to Install this stuff?"
在少数情况下,特别是那些互联网速度较慢的人,我陷入了无限循环:转到页面,等待很长时间(我假设这是下载 CAB 文件的地方),单击黄色条以允许它以“为所有用户安装此 CAB 文件”并重新加载页面。它永远不会弹出窗口说“你确定安装这个东西很酷吗?”
Is there a nice way I can side-step this with a little code? I've downloaded the CAB file and extracted its contents. It's full of DLLs and a SetupScript.vbs. I've tried to just let the SetupScript.vbs run, and I've tried to manually register the DLLs with regsrv32
. I've even copied the required .OCX and .INF files to the C:\Windows\Downloaded Program Files\
and modified the registry to mimick one where the install went smoothly.
有没有一种很好的方法可以用一点代码来回避这个问题?我已经下载了 CAB 文件并提取了它的内容。它充满了 DLL 和一个 SetupScript.vbs。我试图让 SetupScript.vbs 运行,我试图用 .vbs 手动注册 DLL regsrv32
。我什至将所需的 .OCX 和 .INF 文件复制到C:\Windows\Downloaded Program Files\
并修改了注册表以模拟安装顺利的地方。
Despite this, when I visit the webpage, it still takes forever and then goes back into the loop described above.
尽管如此,当我访问网页时,它仍然需要很长时间,然后回到上述循环。
What APIs do I need to call to "properly" register this component so IE can see it? Or is there something more simple that I'm missing?
我需要调用哪些 API 来“正确”注册此组件以便 IE 可以看到它?或者有没有更简单的东西我错过了?
Could someone please point me in the right direction to solve this? The browser is IE8, the OS is Vista.
有人可以指出我解决这个问题的正确方向吗?浏览器为IE8,操作系统为Vista。
Thanks!
谢谢!
回答by Andrew S
In Windows 7 64-bit I copied the OCX files to C:\Windows\SysWOW64 and then ran:
在 Windows 7 64 位中,我将 OCX 文件复制到 C:\Windows\SysWOW64,然后运行:
regsvr32 /s C:\Windows\SysWOW64\PLUGINNAME.ocx
The ActiveX plugin worked fine when I launched IE without prompting for an install.
当我在没有安装提示的情况下启动 IE 时,ActiveX 插件运行良好。
回答by kcabrams
Typo from above and i've noticed with some installations of Windows 8.1 you need to run regsvr32 from the sysWOW64 root folder:
上面的打字错误,我注意到在某些 Windows 8.1 安装中,您需要从 sysWOW64 根文件夹运行 regsvr32:
%SystemRoot%\Syswow64\regsvr32 /s C:\Windows\SysWOW64\pluginname.ocx