windows 从 FireFox 或命令行安装 CAB 文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/644831/
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
Install CAB file from FireFox or command line
提问by Mike Stone
I have a CAB file that contains a few DLLs, and an OCX ActiveX control, an OSD describing the contents, and an INF for installing the DLLs and ActiveX control. These are coming from a 3rd party, so I can't control anything except how they are distributed to the client.
我有一个包含几个 DLL 的 CAB 文件、一个 OCX ActiveX 控件、一个描述内容的 OSD 和一个用于安装 DLL 和 ActiveX 控件的 INF。这些来自第 3 方,所以除了它们如何分发给客户之外,我无法控制任何事情。
They are being used within a Java applet, and they work cross browser, but only IE seems to support actually installing the CAB file.
它们在 Java 小程序中使用,并且可以跨浏览器工作,但似乎只有 IE 支持实际安装 CAB 文件。
The installation is being done via:
安装是通过以下方式完成的:
<OBJECT classid="clsid:actual-class-id-here" NAME="name"
width="0" height="0" codebase="xxxx.cab#Version=w,x,y,z">
<param name="useslibrary" value="xxxx">
<param name="useslibrarycodebase" value="xxxx.cab">
<param name="useslibraryversion" value="w,x,y,z">
</OBJECT>
So, I need a way to install this CAB file that will work cross browser. Since the above will only work via IE, I need an alternative, or I need a way to install it from the command line, which would be a reasonable workaround (I could then set up an installer to take care of it). This needs to work on XP through Vista.
所以,我需要一种方法来安装这个可以跨浏览器工作的 CAB 文件。由于以上只能通过 IE 工作,我需要一个替代方法,或者我需要一种从命令行安装它的方法,这将是一个合理的解决方法(然后我可以设置一个安装程序来处理它)。这需要通过 Vista 在 XP 上运行。
Any help would greatly be appreciated!
任何帮助将不胜感激!
EDIT: Installing from command line would be much preferred, as then I could do a solution that isn't specific to IE, FireFox, or any other browser.
编辑:从命令行安装会更受欢迎,因为那样我可以做一个不特定于 IE、FireFox 或任何其他浏览器的解决方案。
回答by Mike Stone
Ok, so I finally tracked down a website that gave something useful:
好的,所以我终于找到了一个提供有用信息的网站:
http://www.msfn.org/board/install-inf-file-c-t104891.html
http://www.msfn.org/board/install-inf-file-c-t104891.html
And the resulting command I will likely use:
我可能会使用的结果命令:
rundll32.exe advpack.dll,LaunchINFSectionEx .\xxxx.inf,,C:\path\to\xxxx.cab,4
Which I think will do exactly what I want. Now I just need to create a simple installer, and it should all tie together nicely!
我认为这将完全符合我的要求。现在我只需要创建一个简单的安装程序,它应该可以很好地结合在一起!