为ActiveX组件创建CAB文件 [英] create CAB file for ActiveX components

查看:112
本文介绍了为ActiveX组件创建CAB文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好b $ b

请指导为ActiveX组件创建CAB文件。

Hi
Please guide to create CAB file for ActiveX components.

推荐答案

首先,我是正确的提醒一下,这是一个老问题,现在不支持ActiveX,但我希望我的答案仍然可以为任何需要创建.cab文件的人提供服务,我知道即使在今天,也会使用.cab文件。



您需要使用MakeCab.exe,它是任何Windows系统的一部分。



First, as I have been rightly reminded, this is an old question and ActiveX isn't supported these days, however I hope my answer will still serve whoever need to create a .cab file and I know that even today, .cab files are used and required.

You need to use the MakeCab.exe which is part of any Windows system.

Cabinet Maker - Lossless Data Compression Tool

MAKECAB [/V[n]] [/D var=value ...] [/L dir] source [destination]
MAKECAB [/V[n]] [/D var=value ...] /F directive_file [...]

  source         File to compress.
  destination    File name to give compressed file.  If omitted, the
                 last character of the source file name is replaced
                 with an underscore (_) and used as the destination.
  /F directives  A file with MakeCAB directives (may be repeated). Refer to
                 Microsoft Cabinet SDK for information on directive_file.
  /D var=value   Defines variable with specified value.
  /L dir         Location to place destination (default is current directory).
  /V[n]          Verbosity level (1..3).





使用它有点棘手期望只是添加目标.cab名称和您要添加的文件/文件夹。实际上,您需要创建一个文件,然后将其作为MakeCab.exe调用的唯一参数。

此文件以.ddf结尾。

你打电话:





Using it is a bit tricky as you would expect to just add to the call the destination .cab name and the files / folder you wish to add. In fact, you need to create a file which is then given as the one and only parameter to the call to MakeCab.exe.
This file ends with .ddf.
You call:

makecab /f script.ddf



一个典型的.ddf文件将是这样的:




A typical .ddf file will be like this:

;*** script.ddf example
;
.OPTION EXPLICIT     ; Generate errors
.Set CabinetFileCountThreshold=0
.Set FolderFileCountThreshold=0
.Set FolderSizeThreshold=0
.Set MaxCabinetSize=0
.Set MaxDiskFileCount=0
.Set MaxDiskSize=0
.Set CompressionType=MSZIP
.Set Cabinet=on
.Set Compress=on
;Specify file name for new cab file
.Set CabinetNameTemplate=script.cab
; Specify the subdirectory for the files.  
; Your cab file should not have files at the root level,
; and each driver package must be in a separate subfolder.
.Set DestinationDir=script
;Specify files to be included in cab file





Bellow,这些行,在关闭并保存此文件之前,添加您希望成为要创建的.cab的每个文件。



Makecab将创建您的安装磁盘( disk1)你会在哪里找到.cab文件。



Bellow, these lines, before you close and save this file, add each file you wish to be part of the .cab to be created.

Makecab will then create your installation "disk" (disk1) where you will find the .cab file.


A 简单的CP搜索 [ ^ ] woul dhad帮助你获得这些以及更多:

完整的ActiveX Web控制教程 [ ^ ]

正在下载C#法案通过CAB文件的iveX组件 [ ^ ]

逐步在.NET中创建ActiveX [ ^ ]
A simple CP search[^] woul dhad helped you in getting these and more:
A Complete ActiveX Web Control Tutorial[^]
Downloading C# ActiveX Components through CAB File[^]
Create ActiveX in .NET Step by Step[^]


这篇关于为ActiveX组件创建CAB文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆