为网页控件制作cab包及查控件classid的方法
来源:互联网 发布:淘宝特卖天天特价 编辑:程序博客网 时间:2024/05/17 20:38
MakeCAB是微软提供的制作CAB的文件,详细的MakeCAB介绍请参考微软MSDN。
正好这几天做的一个WEB ActiveX SIP Phone需要打包成.CAB文件,于是稍微研究了一下MakeCAB的用法。
直接运行MakeCAB,系统给出命令用法如下:
C:Documents and SettingsSunDesktopwebsipp>makecab
Microsoft (R) Cabinet Maker - Version 5.1.2600.2180
Copyright (c) Microsoft Corporation. All rights reserved..
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. Ifomitted, 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 berepeated).
/D var=value Defines variable with specified value.
/L dir Location to placedestination (default is current directory).
/V[n] Verbositylevel (1..3).
如果目录里面有多个文件,那么就需要编写一个文件列表文件,用来告诉MakeCAB,有多少文件需要打包。
简单的编写了一个list.txt文件,里面仅仅包含2行。一个是libactivex.inf,一个libactivex.dll
然后执行:
makecab /F list.txt /D compressiontype=lzx /Dcompressionmemory=21 /V
系统将显示压缩过程和压缩结果,如下:
Microsoft (R) Cabinet Maker - Version 5.1.2600.2180
Copyright (c) Microsoft Corporation. All rights reserved..
287,395 bytes in 2 files
Totalfiles: 2
Bytes before: 287,395
Bytes after: 162,170
After/Before: 56.43% compression
Time: 0.74 seconds ( 0 hr 0 min 0.74 sec)
Throughput: 378.76 Kb/second
压缩之后,目录下将生成一个目录,将目录里面的文件改名成libactivex.cab(可以是你需要的文件名)就OK了。
正好这几天做的一个WEB ActiveX SIP Phone需要打包成.CAB文件,于是稍微研究了一下MakeCAB的用法。
直接运行MakeCAB,系统给出命令用法如下:
C:Documents and SettingsSunDesktopwebsipp>makecab
Microsoft (R) Cabinet Maker - Version 5.1.2600.2180
Copyright (c) Microsoft Corporation. All rights reserved..
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. Ifomitted, 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 berepeated).
/D var=value Defines variable with specified value.
/L dir Location to placedestination (default is current directory).
/V[n] Verbositylevel (1..3).
如果目录里面有多个文件,那么就需要编写一个文件列表文件,用来告诉MakeCAB,有多少文件需要打包。
简单的编写了一个list.txt文件,里面仅仅包含2行。一个是libactivex.inf,一个libactivex.dll
然后执行:
makecab /F list.txt /D compressiontype=lzx /Dcompressionmemory=21 /V
系统将显示压缩过程和压缩结果,如下:
Microsoft (R) Cabinet Maker - Version 5.1.2600.2180
Copyright (c) Microsoft Corporation. All rights reserved..
287,395 bytes in 2 files
Totalfiles: 2
Bytes before: 287,395
Bytes after: 162,170
After/Before: 56.43% compression
Time: 0.74 seconds ( 0 hr 0 min 0.74 sec)
Throughput: 378.76 Kb/second
压缩之后,目录下将生成一个目录,将目录里面的文件改名成libactivex.cab(可以是你需要的文件名)就OK了。
然后就可以放到WEB服务器的目录下,IE打开的时候就会提示下载了。
2.查控件classid:
在注册表中,查找 XYZ.ocx,就可以看到它的classid
Demo:
list.txt 1.jpg 3.jpg 在同一文件夹test下,在list.txt中:
1.jpg
3.jpg
在cmd中,先到test文件夹下,然后执行:makecab /F G:\test\list.txt /D compressiontype=lzx /D compressionmemory=21 /V
则在该文件夹下,会生成相应的文件
- 为网页控件制作cab包及查控件classid的方法
- 从网页上下载控件时制作CAB包的方法
- 从网页上下载控件时制作CAB包的方法
- 从网页上下载控件时制作CAB包的方法
- 浅谈Active控件的CAB制作包
- 制作activex控件cab的方法
- C#开发ActiveX控件及制作CAB包
- C#开发ActiveX控件及制作CAB包
- C#开发ActiveX控件及制作CAB包
- C#开发ActiveX控件及制作CAB包
- C#开发ActiveX控件及制作CAB包
- C#开发ActiveX控件及制作CAB包
- C#开发ActiveX控件及制作CAB包
- C#开发ActiveX控件及制作CAB包
- asp.net 开发ActiveX控件及制作CAB包
- C#开发ActiveX控件及制作CAB包(转)
- C#开发ActiveX控件及制作CAB包
- C#开发ActiveX控件及制作CAB包
- JMock测试入门
- Shell脚本学习之基本参数
- 聪聪和可可
- Java异常处理及异常机制介绍
- JUnit4 与 JMock 之双剑合璧
- 为网页控件制作cab包及查控件classid的方法
- WPF:简单容器
- DAS?NAS?还是SAN 企业存储模式优劣分析(1)
- 用js控制文本域的只读/可写
- 取出手机中的apk
- IOS Application应用程序核心架构
- storm安装实战
- java 正则表达式 过滤html标签
- 为程序员量身定制的12个目标